cleanup group on auto load if name not found
| @@ -301,6 +301,11 @@ async function RA_autoloadchat() { | |||
| 301 | saveSettingsDebounced(); | 301 | saveSettingsDebounced(); |
| 302 | } else { | 302 | } else { |
| 303 | const result = await openGroupById(String(active_group)); | 303 | const result = await openGroupById(String(active_group)); |
| 304 | if (!result) { | ||
| 305 | setActiveGroup(null); | ||
| 306 | saveSettingsDebounced(); | ||
| 307 | console.warn(`Currently active group with ID ${active_group} not found. Resetting to no active group.`); | ||
| 308 | } | ||
| 304 | } | 309 | } |
| 305 | } | 310 | } |
| 306 | 311 | ||