Preact: Fix users list not updating on autoreconnect (#2407)

This commit is contained in:
Aurastic 2025-05-06 20:54:20 +05:30 committed by GitHub
parent d92db3b07b
commit 6c80aa25a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,6 +131,9 @@ export class ChatRoom extends PSRoom {
const cutOffExactLine = this.lastMessage ? '|' + this.lastMessage?.join('|') : '';
let reconnectMessage = '|raw|<div class="infobox">You reconnected.</div>';
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('|users|')) {
this.add(lines[i]);
}
if (lines[i] === cutOffExactLine) {
cutOffStart = i + 1;
} else if (lines[i].startsWith(`|c:|`)) {