feat: ユーザを除外できるアンテナ (#11277)

* feat: ユーザを除外できるアンテナ

* feat(backend/api): ユーザを除外できるアンテナの作成・更新

* feat(frontend): ユーザを除外できるアンテナの作成・更新

* docs(changelog): add アンテナで一部のユーザを除外したすべてのノートから受信できるようになりました

* fix: d.ts生成時にexport defaultを生成するように

* fix CHANGELOG.md

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
anatawa12 2023-09-22 16:52:43 +09:00 committed by GitHub
parent 90a5511a54
commit 526b3ae0e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 26 additions and 6 deletions

View file

@ -119,6 +119,12 @@ export class AntennaService implements OnApplicationShutdown {
return this.utilityService.getFullApAccount(username, host).toLowerCase();
});
if (!accts.includes(this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase())) return false;
} else if (antenna.src === 'users_blacklist') {
const accts = antenna.users.map(x => {
const { username, host } = Acct.parse(x);
return this.utilityService.getFullApAccount(username, host).toLowerCase();
});
if (accts.includes(this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase())) return false;
}
const keywords = antenna.keywords