diff options
Diffstat (limited to 'src/remote/activitypub/kernel/undo/announce.ts')
| -rw-r--r-- | src/remote/activitypub/kernel/undo/announce.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remote/activitypub/kernel/undo/announce.ts b/src/remote/activitypub/kernel/undo/announce.ts index 38ce5b6c59..e08fea188d 100644 --- a/src/remote/activitypub/kernel/undo/announce.ts +++ b/src/remote/activitypub/kernel/undo/announce.ts @@ -3,14 +3,15 @@ import { IRemoteUser } from '../../../../models/entities/user'; import { IAnnounce, getApId } from '../../type'; import deleteNote from '../../../../services/note/delete'; -export const undoAnnounce = async (actor: IRemoteUser, activity: IAnnounce): Promise<void> => { +export const undoAnnounce = async (actor: IRemoteUser, activity: IAnnounce): Promise<string> => { const uri = getApId(activity); const note = await Notes.findOne({ uri }); - if (!note) return; + if (!note) return 'skip: no such Announce'; await deleteNote(actor, note); + return 'ok: deleted'; }; |