chore: stop stale group call checker on room leave
This commit is contained in:
parent
c5aa899038
commit
fd4577ae84
|
|
@ -2136,6 +2136,9 @@ class Client extends MatrixApi {
|
||||||
}
|
}
|
||||||
// If the membership is "leave" then remove the item and stop here
|
// If the membership is "leave" then remove the item and stop here
|
||||||
else if (found && membership == Membership.leave) {
|
else if (found && membership == Membership.leave) {
|
||||||
|
// stop stale group call checker for left room.
|
||||||
|
room.stopStaleCallsChecker(room.id);
|
||||||
|
|
||||||
rooms.removeAt(roomIndex);
|
rooms.removeAt(roomIndex);
|
||||||
}
|
}
|
||||||
// Update notification, highlight count and/or additional informations
|
// Update notification, highlight count and/or additional informations
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,8 @@ class Room {
|
||||||
setState(state);
|
setState(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
partial = false;
|
|
||||||
startStaleCallsChecker(id);
|
startStaleCallsChecker(id);
|
||||||
|
partial = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the [Event] for the given [typeKey] and optional [stateKey].
|
/// Returns the [Event] for the given [typeKey] and optional [stateKey].
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ extension GroupCallUtils on Room {
|
||||||
void stopStaleCallsChecker(String roomId) {
|
void stopStaleCallsChecker(String roomId) {
|
||||||
if (staleGroupCallsTimer.tryGet(roomId) != null) {
|
if (staleGroupCallsTimer.tryGet(roomId) != null) {
|
||||||
staleGroupCallsTimer[roomId]!.cancel();
|
staleGroupCallsTimer[roomId]!.cancel();
|
||||||
|
Logs().d('stopped stale group calls checker for room $id');
|
||||||
} else {
|
} else {
|
||||||
Logs().w('[VOIP] no stale call checker for room found');
|
Logs().w('[VOIP] no stale call checker for room found');
|
||||||
}
|
}
|
||||||
|
|
@ -137,10 +138,10 @@ extension GroupCallUtils on Room {
|
||||||
'm.terminated': GroupCallTerminationReason.CallEnded,
|
'm.terminated': GroupCallTerminationReason.CallEnded,
|
||||||
});
|
});
|
||||||
|
|
||||||
Logs().d('[VOIP] Group call $groupCallId was killed uwu');
|
Logs().i('[VOIP] Group call $groupCallId was killed uwu');
|
||||||
return req;
|
return req;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Logs().i('killing stale call $groupCallId failed. reason: $e');
|
Logs().e('killing stale call $groupCallId failed. reason: $e');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue