fix: 禁止キーワードを含むノートやリモートの通知を引き起こすブロックされた投稿の処理がDelayed Queueに追加されて再処理される問題 (#468)
This commit is contained in:
parent
24a40a0dba
commit
e99d2b6323
|
@ -24,6 +24,7 @@ import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
|
|||
import { LdSignatureService } from '@/core/activitypub/LdSignatureService.js';
|
||||
import { ApInboxService } from '@/core/activitypub/ApInboxService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type { InboxJobData } from '../types.js';
|
||||
|
||||
|
@ -180,7 +181,15 @@ export class InboxProcessorService {
|
|||
});
|
||||
|
||||
// アクティビティを処理
|
||||
try {
|
||||
await this.apInboxService.performActivity(authUser.user, activity, job.data.user?.id);
|
||||
} catch (e) {
|
||||
if (e instanceof IdentifiableError) {
|
||||
if (e.id === 'e11b3a16-f543-4885-8eb1-66cad131dbfd') return 'blocked mentions from unfamiliar user';
|
||||
if (e.id === '057d8d3e-b7ca-4f8b-b38c-dcdcbf34dc30') return 'blocked notes with prohibited words';
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return 'ok';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue