diff --git a/app/index.js b/app/index.js index 15737e9..4d7f4f0 100644 --- a/app/index.js +++ b/app/index.js @@ -784,6 +784,11 @@ class GlobalBindings { this.requestMove = (user, channel) => { if (this.connected()) { user.model.setChannel(channel.model) + // reflect this change in URL + let currentUrl = url.parse(document.location.href, true) + currentUrl.query.channelName = channel.name() + delete currentUrl.search + window.history.pushState(null, channel.name(), url.format(currentUrl)) } }