This commit is contained in:
syuilo 2018-04-07 15:54:11 +09:00
parent 81d19195cf
commit 7dc06b3d43
2 changed files with 26 additions and 1 deletions

View 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;
};