fix(AntennaService): except me
This commit is contained in:
parent
1a1fafc43f
commit
0a80cec0e3
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user