Fix: AP object / actor type (#5086)
* attributedToがArrayの場合などに対応 * attachment以外で来るDocument系のObjectに対応 * Renote, Reply 対応 * 表示をいい感じに * fix type * revert as const * Fix Note / Question type * attributedToのtypeで複合配列を想定する
This commit is contained in:
		| @@ -10,7 +10,7 @@ import { Users, Notes } from '../../../../models'; | ||||
| import { Note } from '../../../../models/entities/note'; | ||||
| import { User } from '../../../../models/entities/user'; | ||||
| import { fetchMeta } from '../../../../misc/fetch-meta'; | ||||
| import { validActor } from '../../../../remote/activitypub/type'; | ||||
| import { validActor, validPost } from '../../../../remote/activitypub/type'; | ||||
|  | ||||
| export const meta = { | ||||
| 	tags: ['federation'], | ||||
| @@ -145,7 +145,7 @@ async function fetchAny(uri: string) { | ||||
| 		}; | ||||
| 	} | ||||
|  | ||||
| 	if (['Note', 'Question', 'Article'].includes(object.type)) { | ||||
| 	if (validPost.includes(object.type)) { | ||||
| 		const note = await createNote(object.id, undefined, true); | ||||
| 		return { | ||||
| 			type: 'Note', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MeiMei
					MeiMei