[Client] Bound stale-membership room join heal to one attempt

The RespContextError heal (leave + rejoin) previously recurred
unconditionally, so a server that kept returning RespContextError for a
reason other than stale membership would loop forever. Track room ids
that already received a heal and surface the error dialog after one
attempt instead of retrying indefinitely.
This commit is contained in:
Lukas Brübach 2026-09-07 09:00:52 +02:00
parent ffc938c977
commit b98d725bc7
2 changed files with 19 additions and 1 deletions

View file

@ -11,6 +11,7 @@
#include <QGroupBox>
#include <QMap>
#include <QSet>
#include <QTextBrowser>
#include <QTreeWidget>
@ -67,6 +68,8 @@ private:
bool shouldEmitUpdate = false;
/** Room ids with a join command in flight, mapped to whether the tab should be focused once it opens. */
QMap<int, bool> pendingRoomJoins;
/** Room ids for which a stale-membership heal (leave + rejoin) has already been attempted. */
QSet<int> healedRoomJoins;
public:
TabServer(TabSupervisor *_tabSupervisor, AbstractClient *_client);