diff options
Diffstat (limited to 'apps/user_status/src/store/userStatus.js')
-rw-r--r-- | apps/user_status/src/store/userStatus.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/user_status/src/store/userStatus.js b/apps/user_status/src/store/userStatus.js index c54fbe5040b..6d8b5bd1e1f 100644 --- a/apps/user_status/src/store/userStatus.js +++ b/apps/user_status/src/store/userStatus.js @@ -130,12 +130,23 @@ const mutations = { */ loadStatusFromServer(state, { status, statusIsUserDefined, message, icon, clearAt, messageIsPredefined, messageId }) { state.status = status - state.statusIsUserDefined = statusIsUserDefined state.message = message state.icon = icon - state.clearAt = clearAt - state.messageIsPredefined = messageIsPredefined - state.messageId = messageId + + // Don't overwrite certain values if the refreshing comes in via short updates + // E.g. from talk participant list which only has the status, message and icon + if (typeof statusIsUserDefined !== 'undefined') { + state.statusIsUserDefined = statusIsUserDefined + } + if (typeof clearAt !== 'undefined') { + state.clearAt = clearAt + } + if (typeof messageIsPredefined !== 'undefined') { + state.messageIsPredefined = messageIsPredefined + } + if (typeof messageId !== 'undefined') { + state.messageId = messageId + } }, } |