Ignore old webrtc invites
This commit is contained in:
parent
0d159c2db4
commit
09ffa09404
|
@ -983,18 +983,23 @@ class Client extends MatrixApi {
|
|||
|
||||
final rawUnencryptedEvent = update.content;
|
||||
|
||||
if (prevBatch != null && type == 'timeline') {
|
||||
if (rawUnencryptedEvent['type'] == EventTypes.CallInvite) {
|
||||
onCallInvite.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
onCallInvite
|
||||
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallHangup) {
|
||||
onCallHangup.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
onCallHangup
|
||||
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallAnswer) {
|
||||
onCallAnswer.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
onCallAnswer
|
||||
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallCandidates) {
|
||||
onCallCandidates
|
||||
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _updateRoomsByRoomUpdate(RoomUpdate chatUpdate) {
|
||||
// Update the chat list item.
|
||||
|
|
Loading…
Reference in a new issue