From 47a320e2d06d22ded9191ad8aa496b0a547b809c Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Wed, 20 Mar 2024 23:33:31 +0100 Subject: [PATCH] feat: handle callUser links on page without reload Signed-off-by: Grigorii K. Shartsev --- src/store/conversationsStore.js | 4 ++ src/views/WelcomeView.vue | 87 +++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/src/store/conversationsStore.js b/src/store/conversationsStore.js index 2940562fe55..a09ebf4e279 100644 --- a/src/store/conversationsStore.js +++ b/src/store/conversationsStore.js @@ -164,6 +164,10 @@ const getters = { && !getters.isModerator && (conversation.permissions & PARTICIPANT.PERMISSIONS.LOBBY_IGNORE) === 0 }, + getConversationForUser: (state, getters) => { + return (userId) => getters.conversationsList + .find((conversation) => conversation.type === CONVERSATION.TYPE.ONE_TO_ONE && conversation.name === userId) + }, } const mutations = { diff --git a/src/views/WelcomeView.vue b/src/views/WelcomeView.vue index c3958694708..dea546d8027 100644 --- a/src/views/WelcomeView.vue +++ b/src/views/WelcomeView.vue @@ -1,14 +1,19 @@