summary refs log tree commit diff
path: root/src/timeline/TimelineItem.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-14 02:28:35 +0300
commit8e9d210a2a2136d1d517645b2b2412b15da09360 (patch)
treeb58bd7b236e9759bbc4b310ebffb0687f89db47d /src/timeline/TimelineItem.cc
parentAdd support for sending encrypted messages (diff)
downloadnheko-8e9d210a2a2136d1d517645b2b2412b15da09360.tar.xz
Rename the log namespace to avoid symbol clash with the math function
- Patch the olm repo with a CMakeLists.txt file
Diffstat (limited to 'src/timeline/TimelineItem.cc')
-rw-r--r--src/timeline/TimelineItem.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/timeline/TimelineItem.cc b/src/timeline/TimelineItem.cc

index 83a0aaed..3505d347 100644 --- a/src/timeline/TimelineItem.cc +++ b/src/timeline/TimelineItem.cc
@@ -23,6 +23,7 @@ #include "Avatar.h" #include "ChatPage.h" #include "Config.h" +#include "Logging.hpp" #include "timeline/TimelineItem.h" #include "timeline/widgets/AudioItem.h" @@ -653,3 +654,19 @@ TimelineItem::addAvatar() AvatarProvider::resolve( room_id_, userid, this, [this](const QImage &img) { setUserAvatar(img); }); } + +void +TimelineItem::sendReadReceipt() const +{ + if (!event_id_.isEmpty()) + http::v2::client()->read_event(room_id_.toStdString(), + event_id_.toStdString(), + [this](mtx::http::RequestErr err) { + if (err) { + nhlog::net()->warn( + "failed to read_event ({}, {})", + room_id_.toStdString(), + event_id_.toStdString()); + } + }); +}