Preact: Fix old status not clearing in userdetails cache (#2663)

This commit is contained in:
Aurastic 2026-05-08 08:11:39 +05:30 committed by GitHub
parent eeab7e68ae
commit 90fdf398bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -734,11 +734,6 @@ export class ChatRoom extends PSRoom {
}
handleJoinLeave(action: 'join' | 'leave', name: string, silent: boolean) {
if (action === 'join') {
this.addUser(name);
} else if (action === 'leave') {
this.removeUser(name);
}
const showjoins = PS.prefs.showjoins?.[PS.server.id];
if (!(showjoins?.[this.id] ?? showjoins?.['global'] ?? !silent)) return;

View File

@ -402,6 +402,7 @@ export class MainMenuRoom extends PSRoom {
if (!userdetails) {
this.userdetailsCache[userid] = response;
} else {
response.status ||= '';
Object.assign(userdetails, response);
}
PS.rooms[`user-${userid}`]?.update(null);