Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): avoid notifying to remote users on local #13774

Merged
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-

### Server
-
- Fix: 一部の通知がローカル上のリモートユーザーに対して行われていた問題を修正


## 2024.5.0
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/src/core/NotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ export class NotificationService implements OnApplicationShutdown {
): Promise<MiNotification | null> {
const profile = await this.cacheService.userProfileCache.fetch(notifieeId);

// 通知対象がリモートユーザーなら通知しない
if (profile.userHost != null) {
return null;
}

// 古いMisskeyバージョンのキャッシュが残っている可能性がある
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const recieveConfig = (profile.notificationRecieveConfig ?? {})[type];
Expand Down
Loading