rudeshark.net/src/remote/activitypub/act/delete/note.ts

18 lines
387 B
TypeScript
Raw Normal View History

2018-04-06 23:44:29 +02:00
import * as debug from 'debug';
2018-04-06 12:35:23 +02:00
import Post from '../../../../models/post';
import { createDb } from '../../../../queue';
2018-04-06 23:44:29 +02:00
const log = debug('misskey:activitypub');
export default async function(uri: string) {
log(`Deleting the Note: ${uri}`);
const post = await Post.findOneAndDelete({ uri });
2018-04-06 12:35:23 +02:00
createDb({
type: 'deletePostDependents',
id: post._id
}).delay(65536).save();
}