Skip to content

Commit

Permalink
Fix login page issue
Browse files Browse the repository at this point in the history
Currently, the user is sent to the login page
when disable_custom_urls is set regardless
of whether they are logged in or not.

This fixes that issue.

Signed-off-by: Gary Kim <gary@garykim.dev>
  • Loading branch information
gary-kim committed May 11, 2020
1 parent a6a09db commit cbd8f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cbd8f3e

Please sign in to comment.