summary refs log tree commit diff
path: root/src/timeline
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-03 18:38:28 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-03 18:38:28 +0200
commit2a79cd2b6b3548ac86a646b16f5a8d658fdb7282 (patch)
tree8a27f5dbfd1d8c6afb4b0d3d3125785467373f47 /src/timeline
parentFix nullopt when iterating reactions (diff)
downloadnheko-2a79cd2b6b3548ac86a646b16f5a8d658fdb7282.tar.xz
Don't fail on missing key for a device and /rotate-megolm-session command
Diffstat (limited to 'src/timeline')
-rw-r--r--src/timeline/TimelineModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index af26a543..5e8952fc 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1120,6 +1120,12 @@ TimelineModel::handleClaimedKeys( nhlog::net()->debug("{} : \n {}", device_id, rd.second.dump(2)); + if (rd.second.empty() || !rd.second.begin()->contains("key")) { + nhlog::net()->warn("Skipping device {} as it has no key.", + device_id); + continue; + } + // TODO: Verify signatures auto otk = rd.second.begin()->at("key");