fix: filter list for adding p2p call events

This commit is contained in:
td 2022-10-28 21:52:02 +05:30
parent 380963e87a
commit aa03f5aa06
No known key found for this signature in database
GPG Key ID: F6D9E9BF14C7D103
1 changed files with 6 additions and 2 deletions

View File

@ -1981,8 +1981,12 @@ class Client extends MatrixApi {
if (prevBatch != null &&
(type == EventUpdateType.timeline ||
type == EventUpdateType.decryptedTimelineQueue)) {
if (update.content.tryGet<String>('type')?.startsWith('m.call.') ??
false) {
if ((update.content.tryGet<String>('type')?.startsWith('m.call.') ??
false) ||
(update.content
.tryGet<String>('type')
?.startsWith('org.matrix.call.') ??
false)) {
final callEvent = Event.fromJson(update.content, room);
final callId = callEvent.content.tryGet<String>('call_id');
callEvents.add(callEvent);