summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2021-01-01 08:46:08 -0500
committerNicolas Werner <nicolas.werner@hotmail.de>2021-01-07 14:04:54 +0100
commit9bbade37dec0ba98be0e9b20f7a6f45cff59a9b0 (patch)
tree94983d962122f0cdd594d8156ed51b9fe90ebb39 /src/timeline
parentFix Qml control colors (diff)
downloadnheko-9bbade37dec0ba98be0e9b20f7a6f45cff59a9b0.tar.xz
Fix call answered on another device
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/TimelineModel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index adef886d..2b5b5794 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -613,8 +613,13 @@ TimelineModel::addEvents(const mtx::responses::Timeline &timeline) std::visit( [this](auto &event) { event.room_id = room_id_.toStdString(); - if (event.sender != http::client()->user_id().to_string()) + if constexpr (std::is_same_v<std::decay_t<decltype(event)>, + RoomEvent<msg::CallAnswer>>) emit newCallEvent(event); + else { + if (event.sender != http::client()->user_id().to_string()) + emit newCallEvent(event); + } }, e); else if (std::holds_alternative<StateEvent<state::Avatar>>(e))