Ignore old webrtc invites
This commit is contained in:
parent
0d159c2db4
commit
09ffa09404
|
@ -983,15 +983,20 @@ class Client extends MatrixApi {
|
||||||
|
|
||||||
final rawUnencryptedEvent = update.content;
|
final rawUnencryptedEvent = update.content;
|
||||||
|
|
||||||
if (rawUnencryptedEvent['type'] == EventTypes.CallInvite) {
|
if (prevBatch != null && type == 'timeline') {
|
||||||
onCallInvite.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
if (rawUnencryptedEvent['type'] == EventTypes.CallInvite) {
|
||||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallHangup) {
|
onCallInvite
|
||||||
onCallHangup.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallAnswer) {
|
} else if (rawUnencryptedEvent['type'] == EventTypes.CallHangup) {
|
||||||
onCallAnswer.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
onCallHangup
|
||||||
} else if (rawUnencryptedEvent['type'] == EventTypes.CallCandidates) {
|
.add(Event.fromJson(rawUnencryptedEvent, room, sortOrder));
|
||||||
onCallCandidates
|
} else if (rawUnencryptedEvent['type'] == EventTypes.CallAnswer) {
|
||||||
.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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue