Add Event activity-type support (#5785)

This commit is contained in:
MeiMei 2020-01-30 01:38:05 +09:00 committed by GitHub
parent 23f262c2e4
commit a5955c1123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ import { deliverQuestionUpdate } from '../../../services/note/polls/update';
import { extractDbHost, toPuny } from '../../../misc/convert-host'; import { extractDbHost, toPuny } from '../../../misc/convert-host';
import { Notes, Emojis, Polls } from '../../../models'; import { Notes, Emojis, Polls } from '../../../models';
import { Note } from '../../../models/entities/note'; import { Note } from '../../../models/entities/note';
import { IObject, INote, getApIds, getOneApId, getApId, validPost } from '../type'; import { IObject, IPost, getApIds, getOneApId, getApId, validPost } from '../type';
import { Emoji } from '../../../models/entities/emoji'; import { Emoji } from '../../../models/entities/emoji';
import { genId } from '../../../misc/gen-id'; import { genId } from '../../../misc/gen-id';
import { fetchMeta } from '../../../misc/fetch-meta'; import { fetchMeta } from '../../../misc/fetch-meta';
@ -95,7 +95,7 @@ export async function createNote(value: string | IObject, resolver?: Resolver, s
throw new Error('invalid note'); throw new Error('invalid note');
} }
const note: INote = object; const note: IPost = object;
logger.debug(`Note fetched: ${JSON.stringify(note, null, 2)}`); logger.debug(`Note fetched: ${JSON.stringify(note, null, 2)}`);

View File

@ -69,10 +69,10 @@ export interface IOrderedCollection extends IObject {
orderedItems: ApObject; orderedItems: ApObject;
} }
export const validPost = ['Note', 'Question', 'Article', 'Audio', 'Document', 'Image', 'Page', 'Video']; export const validPost = ['Note', 'Question', 'Article', 'Audio', 'Document', 'Image', 'Page', 'Video', 'Event'];
export interface INote extends IObject { export interface IPost extends IObject {
type: 'Note' | 'Question' | 'Article' | 'Audio' | 'Document' | 'Image' | 'Page' | 'Video'; type: 'Note' | 'Question' | 'Article' | 'Audio' | 'Document' | 'Image' | 'Page' | 'Video' | 'Event';
_misskey_content?: string; _misskey_content?: string;
_misskey_quote?: string; _misskey_quote?: string;
quoteUrl?: string; quoteUrl?: string;