From 5ee796dc0f4842a36e45bba86c265b41cfb4179c Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Fri, 1 May 2020 19:46:38 +0200 Subject: [PATCH] set cid for outgoing memos --- src/controller.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controller.cpp b/src/controller.cpp index b1e3f4f..cb32868 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -880,12 +880,19 @@ void Controller::refreshTransactions() { if (!o["memo"].is_null()) { memo = QString::fromStdString(o["memo"]); + QString cid; + for(auto &c : AddressBook::getInstance()->getAllAddressLabels()) + if (ui->ContactZaddr->text().trimmed() == c.getPartnerAddress()) { + + cid = c.getCid(); + }else {cid = "";} + ChatItem item = ChatItem( datetime, address, QString(""), memo, - "", // we have to set the cid here, its included in our Addressbook for this contact + cid, // we have to set the cid here, its included in our Addressbook for this contact txid // true // is an outgoing message );