Skip to content

Commit

Permalink
Frontend reacton on user is already in another call
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Jan 14, 2024
1 parent fac4d87 commit 83bc594
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions frontend/src/ChatParticipantsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@
break
}
}
}).catch((e) => {
console.warn("e.response.status", e.response.status)
if (e.response.status == 409) {
this.setWarning(this.$vuetify.locale.t('$vuetify.user_is_already_in_other_call', this.getUserNameWrapper(dto)))
} else {
throw e
}
})
},
kickFromVideoCall(item) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,6 @@ export default {
chats_not_found: "Chats not found",
users_not_found: "Users not found",
messages_not_found: "Messages not found",
chat_not_found: "The chat doesn't exist or you aren't a participant of the chat"
chat_not_found: "The chat doesn't exist or you aren't a participant of the chat",
user_is_already_in_other_call: "User {0} is already in another call"
}
3 changes: 2 additions & 1 deletion frontend/src/locale/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,6 @@ export default {
chats_not_found: "Чаты не найдены",
users_not_found: "Пользователи не найдены",
messages_not_found: "Сообщения не найдены",
chat_not_found: "Чат не найден или вы в нём не состоите"
chat_not_found: "Чат не найден или вы в нём не состоите",
user_is_already_in_other_call: "Пользователь {0} уже находится в другом звонке"
}

0 comments on commit 83bc594

Please sign in to comment.