aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/actor.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-05-31 14:02:26 +0200
committerChocobozzz <me@florianbigard.com>2019-05-31 14:49:31 +0200
commit57cfff78858b2360d9e038e2a504b761cb51da47 (patch)
tree28575a83f1680f9c40f04b8a71b4f2eb35f90400 /server/lib/activitypub/actor.ts
parent4c72c1cd411b4ff7ed054b584f184117bae91d5b (diff)
downloadPeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.gz
PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.zst
PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.zip
Remove unused actor uuid field
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r--server/lib/activitypub/actor.ts26
1 files changed, 12 insertions, 14 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 25cd40905..e0cb986bd 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -33,7 +33,7 @@ function setAsyncActorKeys (actor: ActorModel) {
33 return actor.save() 33 return actor.save()
34 }) 34 })
35 .catch(err => { 35 .catch(err => {
36 logger.error('Cannot set public/private keys of actor %d.', actor.uuid, { err }) 36 logger.error('Cannot set public/private keys of actor %d.', actor.url, { err })
37 return actor 37 return actor
38 }) 38 })
39} 39}
@@ -128,18 +128,17 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ
128 const followersCount = await fetchActorTotalItems(attributes.followers) 128 const followersCount = await fetchActorTotalItems(attributes.followers)
129 const followingCount = await fetchActorTotalItems(attributes.following) 129 const followingCount = await fetchActorTotalItems(attributes.following)
130 130
131 actorInstance.set('type', attributes.type) 131 actorInstance.type = attributes.type
132 actorInstance.set('uuid', attributes.uuid) 132 actorInstance.preferredUsername = attributes.preferredUsername
133 actorInstance.set('preferredUsername', attributes.preferredUsername) 133 actorInstance.url = attributes.id
134 actorInstance.set('url', attributes.id) 134 actorInstance.publicKey = attributes.publicKey.publicKeyPem
135 actorInstance.set('publicKey', attributes.publicKey.publicKeyPem) 135 actorInstance.followersCount = followersCount
136 actorInstance.set('followersCount', followersCount) 136 actorInstance.followingCount = followingCount
137 actorInstance.set('followingCount', followingCount) 137 actorInstance.inboxUrl = attributes.inbox
138 actorInstance.set('inboxUrl', attributes.inbox) 138 actorInstance.outboxUrl = attributes.outbox
139 actorInstance.set('outboxUrl', attributes.outbox) 139 actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox
140 actorInstance.set('sharedInboxUrl', attributes.endpoints.sharedInbox) 140 actorInstance.followersUrl = attributes.followers
141 actorInstance.set('followersUrl', attributes.followers) 141 actorInstance.followingUrl = attributes.following
142 actorInstance.set('followingUrl', attributes.following)
143} 142}
144 143
145async function updateActorAvatarInstance (actorInstance: ActorModel, avatarName: string, t: Transaction) { 144async function updateActorAvatarInstance (actorInstance: ActorModel, avatarName: string, t: Transaction) {
@@ -388,7 +387,6 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode?: numbe
388 387
389 const actor = new ActorModel({ 388 const actor = new ActorModel({
390 type: actorJSON.type, 389 type: actorJSON.type,
391 uuid: actorJSON.uuid,
392 preferredUsername: actorJSON.preferredUsername, 390 preferredUsername: actorJSON.preferredUsername,
393 url: actorJSON.id, 391 url: actorJSON.id,
394 publicKey: actorJSON.publicKey.publicKeyPem, 392 publicKey: actorJSON.publicKey.publicKeyPem,