fix: clear peer list immediately when leaving a room

This commit is contained in:
Timo
2026-04-22 11:39:27 +02:00
parent a847719b24
commit 5ccdd273cf
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -509,6 +509,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
currentRoom = null;
if (storageInitialized) chrome.storage.session.set({ currentRoom: null });
addLog('Left Room', 'info');
chrome.runtime.sendMessage({ type: 'PEER_UPDATE', peers: [] }).catch(() => {});
} else if (message.type === 'CLEAR_LOGS') {
logs = [];
sendResponse({ status: 'ok' });