mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 16:45:54 +02:00
Refactor
This commit is contained in:
15
src/remote/activitypub/act/undo/index.ts
Normal file
15
src/remote/activitypub/act/undo/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import unfollow from './follow';
|
||||
|
||||
export default async (actor, activity): Promise<void> => {
|
||||
if ('actor' in activity && actor.account.uri !== activity.actor) {
|
||||
throw new Error('invalid actor');
|
||||
}
|
||||
|
||||
switch (activity.object.type) {
|
||||
case 'Follow':
|
||||
unfollow(actor, activity.object);
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user