debug: additional logging

This commit is contained in:
Julian Lam
2024-02-07 12:50:26 -05:00
parent aafdebd211
commit 08f8babd9f

View File

@@ -64,6 +64,8 @@ inbox.like = async (req) => {
throw new Error('[[error:activitypub.invalid-id]]'); throw new Error('[[error:activitypub.invalid-id]]');
} }
winston.info(`[activitypub/inbox/like] id ${id} via ${actor}`);
await posts.upvote(id, actor); await posts.upvote(id, actor);
}; };
@@ -98,6 +100,8 @@ inbox.announce = async (req) => {
await topics.updateLastPostTime(tid, timestamp); await topics.updateLastPostTime(tid, timestamp);
} }
winston.info(`[activitypub/inbox/announce] Parsing id ${pid}`);
// No double-announce allowed // No double-announce allowed
const existing = await topics.events.find(tid, { const existing = await topics.events.find(tid, {
type: 'announce', type: 'announce',
@@ -220,6 +224,8 @@ inbox.undo = async (req) => {
const { type: localType, id } = await helpers.resolveLocalId(object.object); const { type: localType, id } = await helpers.resolveLocalId(object.object);
winston.info(`[activitypub/inbox/undo] ${type} ${localType} ${id} via ${actor}`);
switch (type) { switch (type) {
case 'Follow': { case 'Follow': {
switch (localType) { switch (localType) {