diff --git a/src/components/Chat.vue b/src/components/Chat.vue index e6b351f..59eb539 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -205,6 +205,9 @@ export default { } return this.$router.push({ name: 'home' }) } + if (history.state && history.state.back) { + return this.$router.replace({ path: history.state.back }) + } return this.$router.back() }, // scroll to last message (called when messages changes) diff --git a/src/components/GuestChat.vue b/src/components/GuestChat.vue index 82dc19b..f805924 100644 --- a/src/components/GuestChat.vue +++ b/src/components/GuestChat.vue @@ -24,7 +24,7 @@ export default { }, created () { if (this.$xmpp.nick === null) { - this.$router.back() + this.$router.replace({ name: 'guest', query: { join: this.jid } }) } }, mounted () {