mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Fix crash when we don't have device keys cached
This commit is contained in:
parent
74f17bdc60
commit
559ed57565
1 changed files with 7 additions and 5 deletions
|
@ -340,11 +340,13 @@ encrypt_group_message(const std::string &room_id, const std::string &device_id,
|
||||||
// new member, send them the session at this index
|
// new member, send them the session at this index
|
||||||
sendSessionTo[member_it->first] = {};
|
sendSessionTo[member_it->first] = {};
|
||||||
|
|
||||||
|
if (member_it->second) {
|
||||||
for (const auto &dev : member_it->second->device_keys)
|
for (const auto &dev : member_it->second->device_keys)
|
||||||
if (member_it->first != own_user_id ||
|
if (member_it->first != own_user_id ||
|
||||||
dev.first != device_id)
|
dev.first != device_id)
|
||||||
sendSessionTo[member_it->first].push_back(
|
sendSessionTo[member_it->first].push_back(
|
||||||
dev.first);
|
dev.first);
|
||||||
|
}
|
||||||
|
|
||||||
++member_it;
|
++member_it;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue