summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-07-14 07:34:40 -0400
committertrilene <trilene@runbox.com>2020-07-14 07:34:40 -0400
commit16209ce0730d8516ade53450140fd0e66ce7677a (patch)
tree3631200fe26cd4552a9544cb9ab4d7cdb0d5417a /src
parentRemove comments (diff)
downloadnheko-16209ce0730d8516ade53450140fd0e66ce7677a.tar.xz
Hide incoming CallCandidates in encrypted rooms
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 2c97d576..8d68f24c 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -775,6 +775,15 @@ TimelineModel::internalAddEvents( if (encInfo) emit newEncryptedImage(encInfo.value()); + if (std::holds_alternative< + mtx::events::RoomEvent<mtx::events::msg::CallCandidates>>(e_)) { + // don't display CallCandidate events to user + events.insert(id, e); + if (emitCallEvents) + emit newCallEvent(e_); + continue; + } + if (emitCallEvents) { if (auto callInvite = std::get_if< mtx::events::RoomEvent<mtx::events::msg::CallInvite>>(&e_)) {