diff options
author | Joas Schilling <coding@schilljs.com> | 2021-08-23 17:12:20 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-08-23 17:30:02 +0300 |
commit | f700cbc36bf8192843126af02bdf5ff38b639c42 (patch) | |
tree | af8c191cbf8753f0ca012859970240ebbb60b906 /src/store | |
parent | a58d76c3ae7489cd4dec063d2bd36ca0eb69c3cc (diff) |
Fix event names to kebap-case
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/fileUploadStore.js | 6 | ||||
-rw-r--r-- | src/store/participantsStore.js | 8 | ||||
-rw-r--r-- | src/store/participantsStore.spec.js | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js index b7fd08214..a935b9d6b 100644 --- a/src/store/fileUploadStore.js +++ b/src/store/fileUploadStore.js @@ -262,7 +262,7 @@ const actions = { commit('setCurrentUploadId', undefined) } - EventBus.$emit('uploadStart') + EventBus.$emit('upload-start') // Tag the previously indexed files and add the temporary messages to the // messages list @@ -274,7 +274,7 @@ const actions = { // Add temporary messages (files) to the messages list dispatch('addTemporaryMessage', temporaryMessage) // Scroll the message list - EventBus.$emit('scrollChatToBottom') + EventBus.$emit('scroll-chat-to-bottom') } // Iterate again and perform the uploads for (const index in state.uploads[uploadId].files) { @@ -350,7 +350,7 @@ const actions = { } } } - EventBus.$emit('uploadFinished') + EventBus.$emit('upload-finished') }, /** * Set the folder to store new attachments in diff --git a/src/store/participantsStore.js b/src/store/participantsStore.js index fe6822522..dbf4164dd 100644 --- a/src/store/participantsStore.js +++ b/src/store/participantsStore.js @@ -328,7 +328,7 @@ const actions = { } commit('updateParticipant', { token, index, updatedData }) - EventBus.$once('Signaling::usersInRoom', () => { + EventBus.$once('signaling-users-in-room', () => { commit('finishedConnecting', { token, sessionId: participantIdentifier.sessionId }) }) @@ -398,7 +398,7 @@ const actions = { }) SessionStorage.setItem('joined_conversation', token) - EventBus.$emit('joinedConversation', { token }) + EventBus.$emit('joined-conversation', { token }) return response } catch (error) { if (error?.response?.status === 409 && error?.response?.data?.ocs?.data) { @@ -431,7 +431,7 @@ const actions = { // eslint-disable-next-line no-undef if ($('.oc-dialog-dim').length === 0) { clearInterval(interval) - EventBus.$emit('duplicateSessionDetected') + EventBus.$emit('duplicate-session-detected') window.location = generateUrl('/apps/spreed') } }, 3000) @@ -449,7 +449,7 @@ const actions = { clearInterval(interval) if (!decision) { // Cancel - EventBus.$emit('duplicateSessionDetected') + EventBus.$emit('duplicate-session-detected') window.location = generateUrl('/apps/spreed') } else { // Confirm diff --git a/src/store/participantsStore.spec.js b/src/store/participantsStore.spec.js index 4ba6c39e6..67463ed34 100644 --- a/src/store/participantsStore.spec.js +++ b/src/store/participantsStore.spec.js @@ -374,7 +374,7 @@ describe('participantsStore', () => { expect(store.getters.isConnecting(TOKEN)).toBe(true) - EventBus.$emit('Signaling::usersInRoom') + EventBus.$emit('signaling-users-in-room') expect(store.getters.isInCall(TOKEN)).toBe(true) expect(store.getters.isConnecting(TOKEN)).toBe(false) @@ -423,7 +423,7 @@ describe('participantsStore', () => { expect(store.getters.isConnecting(TOKEN)).toBe(true) - EventBus.$emit('Signaling::usersInRoom') + EventBus.$emit('signaling-users-in-room') expect(store.getters.isInCall(TOKEN)).toBe(true) expect(store.getters.isConnecting(TOKEN)).toBe(false) @@ -469,7 +469,7 @@ describe('participantsStore', () => { beforeEach(() => { joinedConversationEventMock = jest.fn() - EventBus.$once('joinedConversation', joinedConversationEventMock) + EventBus.$once('joined-conversation', joinedConversationEventMock) getParticipantIdentifierMock = jest.fn().mockReturnValue({ attendeeId: 1, |