wip
This commit is contained in:
parent
fba46b4c7f
commit
eb304cb5fb
8 changed files with 114 additions and 108 deletions
15
src/remote/activitypub/act/undo.ts
Normal file
15
src/remote/activitypub/act/undo.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import unfollow from './unfollow';
|
||||
|
||||
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(activity.object);
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue