summary refs log tree commit diff
path: root/src/timeline/EventStore.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-06-13 01:44:25 +0000
committerGitHub <noreply@github.com>2021-06-13 01:44:25 +0000
commit5b4566d3f959e13b34d34a4156a0646b26c7fd08 (patch)
tree11d1b42e1d9f92977c48670605bb8a2e26ddd43c /src/timeline/EventStore.cpp
parentTranslated using Weblate (Esperanto) (diff)
parentFix button spacing (diff)
downloadnheko-5b4566d3f959e13b34d34a4156a0646b26c7fd08.tar.xz
Merge pull request #605 from Nheko-Reborn/qml-roomlist
Qml roomlist and stuff
Diffstat (limited to 'src/timeline/EventStore.cpp')
-rw-r--r--src/timeline/EventStore.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp

index 883d384c..4a9f0fff 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp
@@ -770,7 +770,7 @@ EventStore::decryptEvent(const IdIndex &idx, } mtx::events::collections::TimelineEvents * -EventStore::get(std::string_view id, std::string_view related_to, bool decrypt, bool resolve_edits) +EventStore::get(std::string id, std::string_view related_to, bool decrypt, bool resolve_edits) { if (this->thread() != QThread::currentThread()) nhlog::db()->warn("{} called from a different thread!", __func__); @@ -778,7 +778,7 @@ EventStore::get(std::string_view id, std::string_view related_to, bool decrypt, if (id.empty()) return nullptr; - IdIndex index{room_id_, std::string(id)}; + IdIndex index{room_id_, std::move(id)}; if (resolve_edits) { auto edits_ = edits(index.id); if (!edits_.empty()) { @@ -796,14 +796,12 @@ EventStore::get(std::string_view id, std::string_view related_to, bool decrypt, http::client()->get_event( room_id_, index.id, - [this, - relatedTo = std::string(related_to.data(), related_to.size()), - id = index.id](const mtx::events::collections::TimelineEvents &timeline, - mtx::http::RequestErr err) { + [this, relatedTo = std::string(related_to), id = index.id]( + const mtx::events::collections::TimelineEvents &timeline, + mtx::http::RequestErr err) { if (err) { nhlog::net()->error( - "Failed to retrieve event with id {}, which " - "was " + "Failed to retrieve event with id {}, which was " "requested to show the replyTo for event {}", relatedTo, id);