blob: 7f821cada0a06ded2389b035a3b490734d355d9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { IRemoteUser } from '@/models/entities/user';
import { ILike, getApId } from '../../type';
import deleteReaction from '@/services/note/reaction/delete';
import { fetchNote } from '../../models/note';
/**
* Process Undo.Like activity
*/
export default async (actor: IRemoteUser, activity: ILike) => {
const targetUri = getApId(activity.object);
const note = await fetchNote(targetUri);
if (!note) return `skip: target note not found ${targetUri}`;
await deleteReaction(actor, note);
return `ok`;
};
|