set cid for outgoing memos

This commit is contained in:
DenioD
2020-05-01 19:46:38 +02:00
parent 3ad2b49520
commit 5ee796dc0f

View File

@@ -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
);