test(AntennaService): ignore relation
This commit is contained in:
parent
0a80cec0e3
commit
ccbbdc3dbe
1 changed files with 2 additions and 2 deletions
|
@ -127,13 +127,13 @@ export class AntennaService implements OnApplicationShutdown {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
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;
|
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;
|
||||||
}
|
} */
|
||||||
|
|
||||||
if (antenna.excludeBots && noteUser.isBot) return false;
|
if (antenna.excludeBots && noteUser.isBot) return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue