aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index e65fdac4..25219def 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -659,7 +659,7 @@ void Connection::Private::consumeAccountData(Events&& accountDataEvents)
// After running this loop, the account data events not saved in
// accountData (see the end of the loop body) are auto-cleaned away
for (auto&& eventPtr: accountDataEvents) {
- visit(*eventPtr,
+ switchOnType(*eventPtr,
[this](const DirectChatEvent& dce) {
// https://github.com/quotient-im/libQuotient/wiki/Handling-direct-chat-events
const auto& usersToDCs = dce.usersToDirectChats();
@@ -760,7 +760,7 @@ void Connection::Private::consumeToDeviceEvents(Events&& toDeviceEvents)
<< ee.senderId();
// encryptionManager->updateDeviceKeys();
- visit(*sessionDecryptMessage(ee),
+ switchOnType(*sessionDecryptMessage(ee),
[this, senderKey = ee.senderKey()](const RoomKeyEvent& roomKeyEvent) {
if (auto* detectedRoom = q->room(roomKeyEvent.roomId()))
detectedRoom->handleRoomKeyEvent(roomKeyEvent, senderKey);