Enable read receipts on messages sent through nheko

This commit is contained in:
Konstantinos Sideris 2018-01-05 15:28:38 +02:00
parent 983aea7c76
commit 953634c9b5
2 changed files with 5 additions and 0 deletions

View file

@ -83,6 +83,7 @@ public:
void setUserAvatar(const QImage &pixmap);
DescInfo descriptionMessage() const { return descriptionMsg_; }
QString eventId() const { return event_id_; }
void setEventId(const QString &event_id) { event_id_ = event_id; }
~TimelineItem();

View file

@ -460,6 +460,10 @@ TimelineView::updatePendingMessage(int txn_id, QString event_id)
pending_msgs_.head().txn_id == txn_id) { // We haven't received it yet
auto msg = pending_msgs_.dequeue();
msg.event_id = event_id;
if (msg.widget)
msg.widget->setEventId(event_id);
pending_sent_msgs_.append(msg);
}