diff options
author | Guillaume Girol <symphorien+git@xlumurb.eu> | 2022-02-20 12:00:00 +0000 |
---|---|---|
committer | Guillaume Girol <symphorien+git@xlumurb.eu> | 2022-02-21 12:00:00 +0000 |
commit | 05f7e47a9fe7710973ae59fb7f42609a837b93e2 (patch) | |
tree | 06018950b0b65ea0c9c471b30a359ab442d8ccbe /src/timeline | |
parent | update mtxclient (diff) | |
download | nheko-05f7e47a9fe7710973ae59fb7f42609a837b93e2.tar.xz |
support for hidden read receipts
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/EventStore.cpp | 8 | ||||
-rw-r--r-- | src/timeline/TimelineModel.cpp | 16 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp index 78920ac4..8e244f42 100644 --- a/src/timeline/EventStore.cpp +++ b/src/timeline/EventStore.cpp @@ -16,6 +16,7 @@ #include "EventAccessors.h" #include "Logging.h" #include "MatrixClient.h" +#include "UserSettingsPage.h" #include "Utils.h" Q_DECLARE_METATYPE(Reaction) @@ -220,11 +221,14 @@ EventStore::EventStore(std::string room_id, QObject *) } http::client()->read_event( - room_id_, event_id, [this, event_id](mtx::http::RequestErr err) { + room_id_, + event_id, + [this, event_id](mtx::http::RequestErr err) { if (err) { nhlog::net()->warn("failed to read_event ({}, {})", room_id_, event_id); } - }); + }, + !UserSettings::instance()->readReceipts()); auto idx = idToIndex(event_id); diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index fe92fcf7..64cff6b8 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -1077,12 +1077,16 @@ TimelineModel::setCurrentIndex(int index) void TimelineModel::readEvent(const std::string &id) { - http::client()->read_event(room_id_.toStdString(), id, [this](mtx::http::RequestErr err) { - if (err) { - nhlog::net()->warn( - "failed to read_event ({}, {})", room_id_.toStdString(), currentId.toStdString()); - } - }); + http::client()->read_event( + room_id_.toStdString(), + id, + [this](mtx::http::RequestErr err) { + if (err) { + nhlog::net()->warn( + "failed to read_event ({}, {})", room_id_.toStdString(), currentId.toStdString()); + } + }, + !UserSettings::instance()->readReceipts()); } QString |