mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 12:38:26 +02:00
Manage private chats
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -95,8 +95,13 @@ function setChannels(new_channels) {
|
||||
}
|
||||
|
||||
if (new_channels && (!selected_channel_id || !channels[selected_channel_id])) {
|
||||
if (window.location.hash)
|
||||
selectChannel(window.location.hash.substring(9))
|
||||
if (window.location.hash) {
|
||||
let channel_id = parseInt(window.location.hash.substring(9))
|
||||
if (channels[channel_id])
|
||||
selectChannel(channel_id)
|
||||
else
|
||||
selectChannel(Object.keys(channels)[0])
|
||||
}
|
||||
else
|
||||
selectChannel(Object.keys(channels)[0])
|
||||
}
|
||||
|
Reference in New Issue
Block a user