aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-07 08:59:59 +0200
committerChocobozzz <me@florianbigard.com>2021-05-07 09:00:09 +0200
commita66c2e3252d6cca8958959966f42494ded564023 (patch)
tree79e32e2255c7787cfbd127581a4b162552068d66 /server/lib/activitypub
parent64df4b65aee56784f8edad917c44b24453bf4658 (diff)
downloadPeerTube-a66c2e3252d6cca8958959966f42494ded564023.tar.gz
PeerTube-a66c2e3252d6cca8958959966f42494ded564023.tar.zst
PeerTube-a66c2e3252d6cca8958959966f42494ded564023.zip
Fix remote actor creation date
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actor.ts4
1 files changed, 4 insertions, 0 deletions
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
154 const followersCount = await fetchActorTotalItems(attributes.followers) 154 const followersCount = await fetchActorTotalItems(attributes.followers)
155 const followingCount = await fetchActorTotalItems(attributes.following) 155 const followingCount = await fetchActorTotalItems(attributes.following)
156 156
157 logger.info('coucou', { attributes })
158
157 actorInstance.type = attributes.type 159 actorInstance.type = attributes.type
158 actorInstance.preferredUsername = attributes.preferredUsername 160 actorInstance.preferredUsername = attributes.preferredUsername
159 actorInstance.url = attributes.id 161 actorInstance.url = attributes.id
@@ -165,6 +167,8 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ
165 actorInstance.followersUrl = attributes.followers 167 actorInstance.followersUrl = attributes.followers
166 actorInstance.followingUrl = attributes.following 168 actorInstance.followingUrl = attributes.following
167 169
170 if (attributes.published) actorInstance.remoteCreatedAt = new Date(attributes.published)
171
168 if (attributes.endpoints?.sharedInbox) { 172 if (attributes.endpoints?.sharedInbox) {
169 actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox 173 actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
170 } 174 }