mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 21:26:33 +02:00
wip
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import act from '../../act';
|
||||
import deleteObject from '../../delete';
|
||||
import unfollow from './unfollow';
|
||||
import Resolver from '../../resolver';
|
||||
|
||||
export default async (resolver: Resolver, actor, activity): Promise<void> => {
|
||||
if ('actor' in activity && actor.account.uri !== activity.actor) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
const results = await act(resolver, actor, activity.object);
|
||||
|
||||
await Promise.all(results.map(async promisedResult => {
|
||||
const result = await promisedResult;
|
||||
|
||||
if (result === null || await deleteObject(result) !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (result.object.$ref) {
|
||||
case 'following':
|
||||
await unfollow(result.object);
|
||||
}
|
||||
}));
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user