Skip to content
Snippets Groups Projects
Commit c5d7b963 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conversation: store typers in the conversation

So, that the client can directly use it

jami-client-qt#589

Change-Id: I545f60a13e8d9875244db76ac96829940417c701
parent 1d798f85
No related branches found
No related tags found
No related merge requests found
...@@ -78,6 +78,8 @@ struct Info ...@@ -78,6 +78,8 @@ struct Info
QHash<QString, QString> parentsId; // pair messageid/parentid for messages without parent loaded QHash<QString, QString> parentsId; // pair messageid/parentid for messages without parent loaded
unsigned int unreadMessages = 0; unsigned int unreadMessages = 0;
QSet<QString> typers;
MapStringString infos {}; MapStringString infos {};
QString getCallId() const { return confId.isEmpty() ? callId : confId; } QString getCallId() const { return confId.isEmpty() ? callId : confId; }
......
...@@ -3463,6 +3463,17 @@ ConversationModelPimpl::slotComposingStatusChanged(const QString& accountId, ...@@ -3463,6 +3463,17 @@ ConversationModelPimpl::slotComposingStatusChanged(const QString& accountId,
{ {
if (accountId != linked.owner.id) if (accountId != linked.owner.id)
return; return;
try {
auto& conversation = getConversationForUid(convId).get();
if (isComposing)
conversation.typers.insert(contactUri);
else
conversation.typers.remove(contactUri);
} catch (const std::out_of_range& e) {
qDebug() << "could not update message status for not existing conversation";
}
emit linked.composingStatusChanged(convId, contactUri, isComposing); emit linked.composingStatusChanged(convId, contactUri, isComposing);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment