mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Don't try to load emotes from space parents we are not in
This commit is contained in:
parent
e114b1adc7
commit
fafb9cc4a6
1 changed files with 9 additions and 2 deletions
|
@ -4179,8 +4179,15 @@ Cache::getImagePacks(const std::string &room_id, std::optional<bool> stickers)
|
||||||
|
|
||||||
for (const auto &parent :
|
for (const auto &parent :
|
||||||
getStateEventsWithType<mtx::events::state::space::Parent>(txn, current_room)) {
|
getStateEventsWithType<mtx::events::state::space::Parent>(txn, current_room)) {
|
||||||
if (parent.content.canonical && parent.content.via && !parent.content.via->empty())
|
if (parent.content.canonical && parent.content.via && !parent.content.via->empty()) {
|
||||||
|
try {
|
||||||
addRoomAndCanonicalParents(parent.state_key);
|
addRoomAndCanonicalParents(parent.state_key);
|
||||||
|
} catch (const lmdb::error &) {
|
||||||
|
nhlog::db()->debug("Skipping events from parent community, because we are "
|
||||||
|
"not joined to it: {}",
|
||||||
|
parent.state_key);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue