Merge pull request #3453 from thelounge/xpaw/sync-users-reconnect
Synchronize user list correctly on reconnection
This commit is contained in:
commit
ee91217d98
@ -163,7 +163,16 @@ function mergeChannelData(oldChannels, newChannels) {
|
||||
// Server sends an empty users array, client requests it whenever needed
|
||||
if (key === "users") {
|
||||
if (channel.type === "channel") {
|
||||
channel.usersOutdated = true;
|
||||
if (vueApp.activeChannel && vueApp.activeChannel.channel === currentChannel) {
|
||||
// For currently open channel, request the user list straight away
|
||||
socket.emit("names", {
|
||||
target: channel.id,
|
||||
});
|
||||
} else {
|
||||
// For all other channels, mark the user list as outdated
|
||||
// so an update will be requested whenever user switches to these channels
|
||||
currentChannel.usersOutdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user