fix(AntennaService): except me

This commit is contained in:
オスカー、 2024-05-13 22:22:07 +09:00
parent 1a1fafc43f
commit 0a80cec0e3
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7

View File

@ -129,6 +129,8 @@ export class AntennaService implements OnApplicationShutdown {
public async checkHitAntenna(antenna: MiAntenna, note: (MiNote | Packed<'Note'>), noteUser: { id: MiUser['id']; username: string; host: string | null; isBot: boolean; }): Promise<boolean> { public async checkHitAntenna(antenna: MiAntenna, note: (MiNote | Packed<'Note'>), noteUser: { id: MiUser['id']; username: string; host: string | null; isBot: boolean; }): Promise<boolean> {
if (note.visibility === 'specified') return false; if (note.visibility === 'specified') return false;
if (note.visibility === 'followers') { if (note.visibility === 'followers') {
if (antenna.userId === note.userId) return true;
const relationship = await this.userEntityService.getRelation(antenna.userId, noteUser.id); const relationship = await this.userEntityService.getRelation(antenna.userId, noteUser.id);
if (!relationship.isFollowing) return false; if (!relationship.isFollowing) return false;
} }