Skip to content

Commit

Permalink
[commhistoryd] Process message delivery status on message received
Browse files Browse the repository at this point in the history
In case of IM it is possible to receive an already read message.
  • Loading branch information
Kaffeine committed Sep 24, 2020
1 parent 800ea2f commit ab7d1a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/textchannellistener.cpp
Expand Up @@ -1203,6 +1203,10 @@ void TextChannelListener::handleReceivedMessage(const Tp::ReceivedMessage &messa
event.setDirection(CommHistory::Event::Inbound);
}

Tp::DeliveryStatus deliveryStatus = message.deliveryDetails().status();
if (deliveryStatus == Tp::DeliveryStatusRead)
event.setIsRead(true);

QDateTime receivedTime;
if (message.received().isValid())
receivedTime = message.received();
Expand Down

0 comments on commit ab7d1a4

Please sign in to comment.