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

Receive, and display as file:// links, all types of files

This commit is contained in:
Arseniy Lartsev
2020-05-27 22:14:35 +02:00
parent d65a1639c2
commit e4febbc8c8
5 changed files with 218 additions and 83 deletions

View File

@@ -755,3 +755,11 @@ unsigned getFileSizeKb(const td::td_api::file &file)
{
return getFileSize(file)/1024;
}
std::string makeDocumentDescription(const td::td_api::voiceNote *document)
{
if (!document)
// Unlikely error message not worth translating
return "faulty voice note";
return std::string(_("voice note")) + " [" + document->mime_type_ + "]";
}