diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2020-01-30 01:38:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-30 01:38:05 +0900 |
| commit | a5955c11232110ba45888157724977cda01d3f18 (patch) | |
| tree | e2061aded6cf657407a219c03fcbdfd2ec6cdc04 /src | |
| parent | Add Group and Organization to validActor (#5784) (diff) | |
| download | misskey-a5955c11232110ba45888157724977cda01d3f18.tar.gz misskey-a5955c11232110ba45888157724977cda01d3f18.tar.bz2 misskey-a5955c11232110ba45888157724977cda01d3f18.zip | |
Add Event activity-type support (#5785)
Diffstat (limited to 'src')
| -rw-r--r-- | src/remote/activitypub/models/note.ts | 4 | ||||
| -rw-r--r-- | src/remote/activitypub/type.ts | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 74d764e5e4..10cd68f6ad 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -17,7 +17,7 @@ import { deliverQuestionUpdate } from '../../../services/note/polls/update'; import { extractDbHost, toPuny } from '../../../misc/convert-host'; import { Notes, Emojis, Polls } from '../../../models'; 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 { genId } from '../../../misc/gen-id'; 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'); } - const note: INote = object; + const note: IPost = object; logger.debug(`Note fetched: ${JSON.stringify(note, null, 2)}`); diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index 59495d7891..a05ada69b6 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -69,10 +69,10 @@ export interface IOrderedCollection extends IObject { 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 { - type: 'Note' | 'Question' | 'Article' | 'Audio' | 'Document' | 'Image' | 'Page' | 'Video'; +export interface IPost extends IObject { + type: 'Note' | 'Question' | 'Article' | 'Audio' | 'Document' | 'Image' | 'Page' | 'Video' | 'Event'; _misskey_content?: string; _misskey_quote?: string; quoteUrl?: string; |