diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2019-12-16 17:32:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-16 17:32:22 +0300 |
commit | c0a5a718a81ef82201deeb1261fd14d0b96714fe (patch) | |
tree | a949a87d8399d474a5c4888d13f82578e960df9f | |
parent | 32049dc1c3da8ce804a89563b74ca0f1d6e6cd25 (diff) | |
parent | 7c2b4dd6cbf5e9a00adde0736846b9b9ebe87906 (diff) |
Merge pull request #2580 from nextcloud/bugfix/2555/fix-guests-joining-a-callv8.0.0-alpha.1
Fix guests joining a call
-rw-r--r-- | src/App.vue | 22 | ||||
-rw-r--r-- | src/utils/signaling.js | 4 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index 9cda146f9..f4bc4b001 100644 --- a/src/App.vue +++ b/src/App.vue @@ -171,6 +171,14 @@ export default { */ EventBus.$once('conversationsReceived', () => { if (this.$route.name === 'conversation') { + if (!getCurrentUser()) { + EventBus.$once('joinedConversation', () => { + // FIXME Refresh the data now that the user joined the conversation + // The join request returns this data already, but it's lost in the signaling code + this.fetchSingleConversation(this.token) + }) + } + // Adjust the page title once the conversation list is loaded this.setPageTitle(this.getConversationName(this.token), false) // Update current token in the token store @@ -298,7 +306,19 @@ export default { */ const response = await fetchConversation(token) // this.$store.dispatch('purgeConversationsStore') - this.$store.dispatch('addConversation', response.data.ocs.data) + const conversationData = response.data.ocs.data + this.$store.dispatch('addConversation', conversationData) + this.$store.dispatch('addParticipant', { + token, + participant: { + userId: getCurrentUser() ? getCurrentUser().uid : '', // TODO Does this work for public shares while being logged in, etc? + displayName: getCurrentUser() ? getCurrentUser().displayName : '', // TODO guest name from localstore? + inCall: conversationData.participantFlags, + lastPing: conversationData.lastPing, + sessionId: conversationData.sessionId, + participantType: conversationData.participantType, + }, + }) /** * Emits a global event that is used in App.vue to update the page title once the diff --git a/src/utils/signaling.js b/src/utils/signaling.js index a4f70a10d..1b39e1760 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -856,7 +856,9 @@ Signaling.Standalone.prototype.joinRoom = function(token /*, password */) { // callback, leading to two entries for anonymous participants. console.log('Not connected to signaling server yet, defer joining room', token) this.currentRoomToken = token - return + return new Promise((resolve, reject) => { + // FIXME ? + }) } return Signaling.Base.prototype.joinRoom.apply(this, arguments) |