mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-08-21 02:23:38 +00:00
don't allow boosts to be fetched as a note over AP
This commit is contained in:
parent
1aeaee7f7c
commit
82b90d02ae
1 changed files with 6 additions and 1 deletions
|
@ -33,7 +33,7 @@ import type Logger from '@/logger.js';
|
||||||
import { LoggerService } from '@/core/LoggerService.js';
|
import { LoggerService } from '@/core/LoggerService.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { IActivity, IAnnounce, ICreate } from '@/core/activitypub/type.js';
|
import { IActivity, IAnnounce, ICreate } from '@/core/activitypub/type.js';
|
||||||
import { isQuote, isRenote } from '@/misc/is-renote.js';
|
import { isPureRenote, isQuote, isRenote } from '@/misc/is-renote.js';
|
||||||
import * as Acct from '@/misc/acct.js';
|
import * as Acct from '@/misc/acct.js';
|
||||||
import { CacheService } from '@/core/CacheService.js';
|
import { CacheService } from '@/core/CacheService.js';
|
||||||
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions, FastifyBodyParser } from 'fastify';
|
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions, FastifyBodyParser } from 'fastify';
|
||||||
|
@ -842,6 +842,11 @@ export class ActivityPubServerService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Boosts don't federate directly - they should only be referenced as an activity
|
||||||
|
if (isPureRenote(note)) {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
this.setResponseType(request, reply);
|
this.setResponseType(request, reply);
|
||||||
|
|
||||||
const author = await this.usersRepository.findOneByOrFail({ id: note.userId });
|
const author = await this.usersRepository.findOneByOrFail({ id: note.userId });
|
||||||
|
|
Loading…
Add table
Reference in a new issue