hippofish/src/remote/activitypub/kernel/create/note.ts

14 lines
415 B
TypeScript
Raw Normal View History

2018-04-08 21:08:56 +02:00
import Resolver from '../../resolver';
import { IRemoteUser } from '../../../../models/user';
import { createNote, fetchNote } from '../../objects/note';
/**
* 稿
*/
export default async function(resolver: Resolver, actor: IRemoteUser, note, silent = false): Promise<void> {
const exist = await fetchNote(note);
if (exist == null) {
await createNote(note);
}
}