Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-09-17 10:58:25 +0300
committerJoas Schilling <coding@schilljs.com>2020-09-17 11:00:04 +0300
commit9e0d759485458e3d2dfce4b3bb8f4733510689c3 (patch)
tree0b3a6aa349957712f2847e53b1757c60a6d26d62 /src
parent9350964ca078c068966cc00542c137a4bcf96f42 (diff)
Emit the same event when we know that the status might be changed
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsTab.vue11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components/RightSidebar/Participants/ParticipantsTab.vue b/src/components/RightSidebar/Participants/ParticipantsTab.vue
index 6397e7da9..bc874f095 100644
--- a/src/components/RightSidebar/Participants/ParticipantsTab.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsTab.vue
@@ -61,6 +61,7 @@ import Hex from 'crypto-js/enc-hex'
import CancelableRequest from '../../../utils/cancelableRequest'
import Axios from '@nextcloud/axios'
import { showError } from '@nextcloud/dialogs'
+import { emit } from '@nextcloud/event-bus'
import ParticipantsSearchResults from './ParticipantsSearchResults/ParticipantsSearchResults'
export default {
@@ -228,6 +229,8 @@ export default {
this.cancelGetParticipants = cancel
const participants = await request(token)
this.$store.dispatch('purgeParticipantsStore', token)
+
+ const hasUserStatuses = !!participants.headers['x-nextcloud-has-user-statuses']
participants.data.ocs.data.forEach(participant => {
this.$store.dispatch('addParticipant', {
token: token,
@@ -240,6 +243,14 @@ export default {
actorId: Hex.stringify(SHA1(participant.sessionId)),
actorDisplayName: participant.displayName,
})
+ } else if (hasUserStatuses) {
+ emit('user_status:status.updated', {
+ status: participant.status,
+ message: participant.statusMessage,
+ icon: participant.statusIcon,
+ clearAt: participant.statusClearAt,
+ userId: participant.userId,
+ })
}
})
this.participantsInitialised = true