mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 06:46:10 +02:00
AP featured collectionの修正 / Collection Activityの対応 / typeの修正など (#5460)
* resolver type / fix updateFeatured * type ApObject * fix strange type * AP Activity * Collection Activityが失敗したらとりあえず無視
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import config from '../../../../config';
|
||||
import { IBlock } from '../../type';
|
||||
import { IBlock, getApId } from '../../type';
|
||||
import block from '../../../../services/blocking/create';
|
||||
import { apLogger } from '../../logger';
|
||||
import { Users } from '../../../../models';
|
||||
@@ -8,10 +8,9 @@ import { IRemoteUser } from '../../../../models/entities/user';
|
||||
const logger = apLogger;
|
||||
|
||||
export default async (actor: IRemoteUser, activity: IBlock): Promise<void> => {
|
||||
const id = typeof activity.object == 'string' ? activity.object : activity.object.id;
|
||||
if (id == null) throw new Error('missing id');
|
||||
const id = getApId(activity.object);
|
||||
|
||||
const uri = activity.id || activity;
|
||||
const uri = getApId(activity);
|
||||
|
||||
logger.info(`Block: ${uri}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user