2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-08-31 05:55:08 +00:00

Set correct "who" for file transfers, and verify in tests

This commit is contained in:
Arseniy Lartsev
2020-10-04 18:57:14 +02:00
parent b3baa548f6
commit 089913eb26
11 changed files with 55 additions and 35 deletions

View File

@@ -1128,7 +1128,7 @@ void PurpleTdClient::showFileMessage(const td::td_api::chat &chat, TgMessageInfo
showFileInline(chat, message, *file, captionStr, fileDescription, nullptr,
&PurpleTdClient::showDownloadedFileInline);
} else
requestStandardDownload(message, fileName, *file, m_transceiver, m_data);
requestStandardDownload(getId(chat), message, fileName, *file, m_transceiver, m_data);
}
}
@@ -1255,7 +1255,7 @@ void PurpleTdClient::showMessage(const td::td_api::chat &chat, td::td_api::messa
TgMessageInfo messageInfo;
messageInfo.type = TgMessageInfo::Type::Other;
messageInfo.sender = getSenderPurpleName(chat, message, m_data);
messageInfo.incomingGroupchatSender = getIncomingGroupchatSenderPurpleName(chat, message, m_data);
messageInfo.timestamp = message.date_;
messageInfo.outgoing = message.is_outgoing_;
messageInfo.sentLocally = (message.sending_state_ != nullptr);