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

Unnecessary notification to remote users on local #13773

Closed
1 task done
zyoshoka opened this issue Apr 30, 2024 · 0 comments · Fixed by #13774
Closed
1 task done

Unnecessary notification to remote users on local #13773

zyoshoka opened this issue Apr 30, 2024 · 0 comments · Fixed by #13774
Labels
⚠️bug? This might be a bug packages/backend Server side specific issue/PR

Comments

@zyoshoka
Copy link
Contributor

💡 Summary

一部の通知(「フォローが受理された」、「アンケートが終了」)がローカル上に登録されたリモートユーザーに対して行われていますが不要かと思われます。

例えば「リアクション」通知の場合はローカルユーザーのみの通知になっています。

// リアクションされたユーザーがローカルユーザーなら通知を作成
if (note.userHost === null) {
this.notificationService.createNotification(note.userId, 'reaction', {
noteId: note.id,
reaction: reaction,
}, user.id);
}

一方で「アンケートが終了」通知の場合はそうはなっていません。

const userIds = [...new Set([note.userId, ...votes.map(v => v.userId)])];
for (const userId of userIds) {
this.notificationService.createNotification(userId, 'pollEnded', {
noteId: note.id,
});
}

🥰 Expected Behavior

通知はローカル上のリモートユーザーに対して行われない

🤬 Actual Behavior

一部の通知(「フォローが受理された」、「アンケートが終了」)がローカル上のリモートユーザーに対して行われている

📝 Steps to Reproduce

No response

💻 Frontend Environment

No response

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* Misskey: 2024.3.1
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug packages/backend Server side specific issue/PR
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants