diff --git a/src/main.js b/src/main.js index 5db20343..91904f53 100644 --- a/src/main.js +++ b/src/main.js @@ -34,7 +34,7 @@ function main () { originalTitle = document.title; iframe = document.getElementById('riot-iframe'); - if (!window.location.hash && loadState('riotchat', 'disable_custom_urls') === 'true') { + if (!window.location.hash && loadState('riotchat', 'disable_custom_urls') === 'true' && !window.localStorage.getItem('mx_user_id')) { iframe.src = generateUrl('/apps/riotchat/riot/') + '#/login'; window.location.hash = '#/login'; } else {