Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-10-23 10:54:48 +0300
committerGitHub <noreply@github.com>2020-10-23 10:54:48 +0300
commit8625b1627d6b92b3437e8635529f638934f88202 (patch)
tree2bc00412c867001251f347fb2264abece75752e7
parent528ffcd527766d9c18d917c02125e9fdced99446 (diff)
parent49b499c7dc71e784d93f206d00d1719e3a78bf10 (diff)
Merge pull request #4443 from nextcloud/backport/4374/stable19
[stable19] Only show the conflict warning when the session was in a call
-rw-r--r--lib/Controller/RoomController.php4
-rw-r--r--src/App.vue10
-rw-r--r--src/views/SessionConflictView.vue10
3 files changed, 21 insertions, 3 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index 64e6800f3..8c62306be 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1188,8 +1188,8 @@ class RoomController extends AEnvironmentAwareController {
}
if ($previousSession instanceof Participant && $previousSession->getSessionId() !== '0') {
- // Previous session was active
- if ($force === false) {
+ if ($force === false && $previousSession->getInCallFlags() !== Participant::FLAG_DISCONNECTED) {
+ // Previous session was active in the call, show a warning
return new DataResponse([
'sessionId' => $previousSession->getSessionId(),
'inCall' => $previousSession->getInCallFlags(),
diff --git a/src/App.vue b/src/App.vue
index 68ca324cc..2078e665e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -361,7 +361,11 @@ export default {
this.$store.dispatch('setWindowVisibility', !document.hidden)
if (this.windowIsVisible) {
// Remove the potential "*" marker for unread chat messages
- this.setPageTitle(this.getConversationName(this.token), false)
+ let title = this.getConversationName(this.token)
+ if (window.document.title.indexOf(t('spreed', 'Duplicate session')) === 0) {
+ title = t('spreed', 'Duplicate session')
+ }
+ this.setPageTitle(title, false)
} else {
// Copy the last message map to the saved version,
// this will be our reference to check if any chat got a new
@@ -380,6 +384,10 @@ export default {
// On the first load we store the current page title "Talk - Nextcloud",
// so we can append it every time again
this.defaultPageTitle = window.document.title
+ // Coming from a "Duplicate session - Talk - …" page?
+ if (this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Talk') + ' - ') !== -1) {
+ this.defaultPageTitle = this.defaultPageTitle.substring(this.defaultPageTitle.indexOf(' - ' + t('spreed', 'Talk') + ' - ') + 3)
+ }
// When a conversation is opened directly, the "Talk - " part is
// missing from the title
if (this.defaultPageTitle.indexOf(t('spreed', 'Talk') + ' - ') !== 0) {
diff --git a/src/views/SessionConflictView.vue b/src/views/SessionConflictView.vue
index 4b5974608..9e22b434d 100644
--- a/src/views/SessionConflictView.vue
+++ b/src/views/SessionConflictView.vue
@@ -11,5 +11,15 @@
<script>
export default {
name: 'SessionConflictView',
+
+ mounted() {
+ this.setPageTitle()
+ },
+
+ methods: {
+ setPageTitle() {
+ window.document.title = t('spreed', 'Duplicate session') + ' - ' + window.document.title
+ },
+ },
}
</script>