aboutsummaryrefslogtreecommitdiff
path: root/src/modules/users.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-01-14 22:38:37 +0300
committerHenry Jameson <me@hjkos.com>2019-01-14 22:38:37 +0300
commit790fcf37d223f129640aca20c7e185a26b226cdd (patch)
treec77583e4f4f1c24eaa2da2958782d8f9fa3de147 /src/modules/users.js
parente0fd6d12ed8e4105a5c95bf4f5b36bec4bd31183 (diff)
notifications now also undergo some parsing, hypothetically could use MastoAPI
notifications, maybe.
Diffstat (limited to 'src/modules/users.js')
-rw-r--r--src/modules/users.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/users.js b/src/modules/users.js
index adbd37dd..33c02a07 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -68,6 +68,7 @@ export const mutations = {
},
setUserForNotification (state, notification) {
notification.action.user = state.usersObject[notification.action.user.id]
+ notification.from_profile = state.usersObject[notification.action.user.id]
},
setColor (state, { user: { id }, highlighted }) {
const user = state.usersObject[id]
@@ -149,8 +150,8 @@ const users = {
})
},
addNewNotifications (store, { notifications }) {
- const users = compact(map(notifications, 'from_profile'))
- const notificationIds = compact(notifications.map(_ => String(_.id)))
+ const users = map(notifications, 'from_profile')
+ const notificationIds = notifications.map(_ => String(_.id))
store.commit('addNewUsers', users)
const notificationsObject = store.rootState.statuses.notifications.idStore