From a66c2e3252d6cca8958959966f42494ded564023 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 May 2021 08:59:59 +0200 Subject: Fix remote actor creation date --- server/lib/activitypub/actor.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/lib') diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index eec951d4e..34d53bd52 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -154,6 +154,8 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ const followersCount = await fetchActorTotalItems(attributes.followers) const followingCount = await fetchActorTotalItems(attributes.following) + logger.info('coucou', { attributes }) + actorInstance.type = attributes.type actorInstance.preferredUsername = attributes.preferredUsername actorInstance.url = attributes.id @@ -165,6 +167,8 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ actorInstance.followersUrl = attributes.followers actorInstance.followingUrl = attributes.following + if (attributes.published) actorInstance.remoteCreatedAt = new Date(attributes.published) + if (attributes.endpoints?.sharedInbox) { actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox } -- cgit v1.2.3