Resolve #6192
This commit is contained in:
parent
9ea1ed8559
commit
614a1d74dd
21 changed files with 229 additions and 91 deletions
|
@ -78,7 +78,8 @@ class NotificationManager {
|
|||
|
||||
// 通知される側のユーザーが通知する側のユーザーをミュートしていない限りは通知する
|
||||
if (!mentioneesMutedUserIds.includes(this.notifier.id)) {
|
||||
createNotification(x.target, this.notifier.id, x.reason, {
|
||||
createNotification(x.target, x.reason, {
|
||||
notifierId: this.notifier.id,
|
||||
noteId: this.note.id
|
||||
});
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ export default async function(user: User, note: Note, choice: number) {
|
|||
});
|
||||
|
||||
// Notify
|
||||
createNotification(note.userId, user.id, 'pollVote', {
|
||||
createNotification(note.userId, 'pollVote', {
|
||||
notifierId: user.id,
|
||||
noteId: note.id,
|
||||
choice: choice
|
||||
});
|
||||
|
@ -60,7 +61,8 @@ export default async function(user: User, note: Note, choice: number) {
|
|||
})
|
||||
.then(watchers => {
|
||||
for (const watcher of watchers) {
|
||||
createNotification(watcher.userId, user.id, 'pollVote', {
|
||||
createNotification(watcher.userId, 'pollVote', {
|
||||
notifierId: user.id,
|
||||
noteId: note.id,
|
||||
choice: choice
|
||||
});
|
||||
|
|
|
@ -66,7 +66,8 @@ export default async (user: User, note: Note, reaction?: string) => {
|
|||
|
||||
// リアクションされたユーザーがローカルユーザーなら通知を作成
|
||||
if (note.userHost === null) {
|
||||
createNotification(note.userId, user.id, 'reaction', {
|
||||
createNotification(note.userId, 'reaction', {
|
||||
notifierId: user.id,
|
||||
noteId: note.id,
|
||||
reaction: reaction
|
||||
});
|
||||
|
@ -78,7 +79,8 @@ export default async (user: User, note: Note, reaction?: string) => {
|
|||
userId: Not(user.id)
|
||||
}).then(watchers => {
|
||||
for (const watcher of watchers) {
|
||||
createNotification(watcher.userId, user.id, 'reaction', {
|
||||
createNotification(watcher.userId, 'reaction', {
|
||||
notifierId: user.id,
|
||||
noteId: note.id,
|
||||
reaction: reaction
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue