aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/process/process.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts
index 40f19c701..54981c289 100644
--- a/server/lib/activitypub/process/process.ts
+++ b/server/lib/activitypub/process/process.ts
@@ -23,8 +23,14 @@ const processActivity: { [ P in ActivityType ]: (activity: Activity, inboxAccoun
23 Like: processLikeActivity 23 Like: processLikeActivity
24} 24}
25 25
26async function processActivities (activities: Activity[], inboxAccount?: AccountInstance) { 26async function processActivities (activities: Activity[], signatureAccount?: AccountInstance, inboxAccount?: AccountInstance) {
27 for (const activity of activities) { 27 for (const activity of activities) {
28 // When we fetch remote data, we don't have signature
29 if (signatureAccount && activity.actor !== signatureAccount.url) {
30 logger.warn('Signature mismatch between %s and %s.', activity.actor, signatureAccount.url)
31 continue
32 }
33
28 const activityProcessor = processActivity[activity.type] 34 const activityProcessor = processActivity[activity.type]
29 if (activityProcessor === undefined) { 35 if (activityProcessor === undefined) {
30 logger.warn('Unknown activity type %s.', activity.type, { activityId: activity.id }) 36 logger.warn('Unknown activity type %s.', activity.type, { activityId: activity.id })