зеркало из https://github.com/nextcloud/spreed.git
Handle signaling message for recording status changes in UI
This just updates the conversation property "callRecording" as soon as the signaling message is received, rather than having to wait until the whole conversation data is fetched again. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
d48a582dc2
Коммит
4511978305
|
@ -63,3 +63,7 @@ EventBus.$on('signaling-join-room', (payload) => {
|
|||
const token = payload[0]
|
||||
store.dispatch('updateLastJoinedConversationToken', token)
|
||||
})
|
||||
|
||||
EventBus.$on('signaling-recording-status-changed', (token, status) => {
|
||||
store.dispatch('setConversationProperties', { token, properties: { callRecording: status } })
|
||||
})
|
||||
|
|
|
@ -1281,7 +1281,7 @@ Signaling.Standalone.prototype.processRoomEvent = function(data) {
|
|||
})
|
||||
break
|
||||
case 'message':
|
||||
this.processRoomMessageEvent(data.event.message.data)
|
||||
this.processRoomMessageEvent(data.event.message.roomid, data.event.message.data)
|
||||
break
|
||||
default:
|
||||
console.error('Unknown room event', data)
|
||||
|
@ -1289,12 +1289,15 @@ Signaling.Standalone.prototype.processRoomEvent = function(data) {
|
|||
}
|
||||
}
|
||||
|
||||
Signaling.Standalone.prototype.processRoomMessageEvent = function(data) {
|
||||
Signaling.Standalone.prototype.processRoomMessageEvent = function(token, data) {
|
||||
switch (data.type) {
|
||||
case 'chat':
|
||||
// FIXME this is not listened to
|
||||
EventBus.$emit('should-refresh-chat-messages')
|
||||
break
|
||||
case 'recording':
|
||||
EventBus.$emit('signaling-recording-status-changed', token, data.recording.status)
|
||||
break
|
||||
default:
|
||||
console.error('Unknown room message event', data)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче