fix(xep): Somehow fix reconnection issues
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
c504afc944
commit
4a681b9483
@ -65,6 +65,7 @@ class MUCManager extends XmppManagerBase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final mucJoins = List<MUCRoomJoin>.empty(growable: true);
|
||||||
await _cacheLock.synchronized(() async {
|
await _cacheLock.synchronized(() async {
|
||||||
// Mark all groupchats as not joined.
|
// Mark all groupchats as not joined.
|
||||||
for (final jid in _mucRoomCache.keys) {
|
for (final jid in _mucRoomCache.keys) {
|
||||||
@ -72,14 +73,19 @@ class MUCManager extends XmppManagerBase {
|
|||||||
|
|
||||||
// Re-join all MUCs.
|
// Re-join all MUCs.
|
||||||
final state = _mucRoomCache[jid]!;
|
final state = _mucRoomCache[jid]!;
|
||||||
await _sendMucJoin(
|
mucJoins.add((jid, state.nick!));
|
||||||
jid,
|
|
||||||
state.nick!,
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
_joinedPreparedRooms = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
for (final join in mucJoins) {
|
||||||
|
final (jid, nick) = join;
|
||||||
|
await _sendMucJoin(
|
||||||
|
jid,
|
||||||
|
nick,
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
_joinedPreparedRooms = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Prepares the internal room list to ensure that the rooms
|
/// Prepares the internal room list to ensure that the rooms
|
||||||
|
Loading…
Reference in New Issue
Block a user