зеркало из https://github.com/nextcloud/spreed.git
Merge pull request #5172 from nextcloud/bugfix/5144/js-error-when-posting-as-guest
Fix js error when posting as guest
This commit is contained in:
Коммит
80512e5b64
|
@ -300,7 +300,7 @@ export default {
|
|||
clearTimeout(timeout)
|
||||
|
||||
// If successful, deletes the temporary message from the store
|
||||
this.$store.dispatch('deleteMessage', temporaryMessage)
|
||||
this.$store.dispatch('removeTemporaryMessageFromStore', temporaryMessage)
|
||||
// And adds the complete version of the message received
|
||||
// by the server
|
||||
this.$store.dispatch('processMessage', response.data.ocs.data)
|
||||
|
|
|
@ -50,18 +50,14 @@ const joinConversation = async(token) => {
|
|||
force: forceJoin,
|
||||
})
|
||||
|
||||
const conversation = response.data.ocs.data
|
||||
if (conversation.actorType !== 'guests') {
|
||||
store.dispatch('addConversation', response.data.ocs.data)
|
||||
}
|
||||
|
||||
// Update the participant and actor session after a force join
|
||||
store.dispatch('setCurrentParticipant', response.data.ocs.data)
|
||||
store.dispatch('addConversation', response.data.ocs.data)
|
||||
store.dispatch('updateSessionId', {
|
||||
token: token,
|
||||
participantIdentifier: store.getters.getParticipantIdentifier(),
|
||||
sessionId: response.data.ocs.data.sessionId,
|
||||
})
|
||||
store.dispatch('setCurrentParticipant', response.data.ocs.data)
|
||||
|
||||
// FIXME Signaling should not be synchronous
|
||||
await signalingJoinConversation(token, response.data.ocs.data.sessionId)
|
||||
|
|
|
@ -284,6 +284,16 @@ const actions = {
|
|||
context.commit('markTemporaryMessageAsFailed', { message, reason })
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove temporary message from store after receiving the parsed one from server
|
||||
*
|
||||
* @param {object} context default store context;
|
||||
* @param {object} message the temporary message;
|
||||
*/
|
||||
removeTemporaryMessageFromStore(context, message) {
|
||||
context.commit('deleteMessage', message)
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {object} context default store context;
|
||||
* @param {string} token Token of the conversation
|
||||
|
|
Загрузка…
Ссылка в новой задаче