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

@@ -132,7 +132,8 @@ export default define(meta, async (ps, user) => {
});
// Notify
createNotification(note.userId, user.id, 'pollVote', {
createNotification(note.userId, 'pollVote', {
notifierId: user.id,
noteId: note.id,
choice: ps.choice
});
@@ -143,7 +144,8 @@ export default define(meta, async (ps, user) => {
userId: Not(user.id),
}).then(watchers => {
for (const watcher of watchers) {
createNotification(watcher.userId, user.id, 'pollVote', {
createNotification(watcher.userId, 'pollVote', {
notifierId: user.id,
noteId: note.id,
choice: ps.choice
});