This commit is contained in:
syuilo 2020-03-28 18:07:41 +09:00
parent 9ea1ed8559
commit 614a1d74dd
21 changed files with 229 additions and 91 deletions

View file

@ -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
});
}

View file

@ -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
});

View file

@ -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
});