diff options
-rw-r--r-- | protocols/Telegram/src/utils.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index a694069694..1ddd2a4440 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -346,6 +346,20 @@ CMStringA CTelegramProto::GetMessageText(TG_USER *pUser, const TD::message *pMsg }
break;
+ case TD::messageAnimation::ID:
+ {
+ auto *pDoc = (TD::messageAnimation *)pBody;
+ auto *pVideo = pDoc->animation_.get();
+ CMStringA fileName(FORMAT, "%s (%d x %d, %d %s)", TranslateU("Video"), pVideo->width_, pVideo->height_, pVideo->duration_, TranslateU("seconds"));
+ std::string caption = fileName.c_str();
+ if (!pDoc->caption_->text_.empty()) {
+ caption += " ";
+ caption += pDoc->caption_->text_;
+ }
+ GetMessageFile(TG_FILE_REQUEST::VIDEO, pUser, pVideo->animation_.get(), pVideo->file_name_.c_str(), caption, szId, pszUserId, pMsg->date_);
+ }
+ break;
+
case TD::messageVoiceNote::ID:
{
auto *pDoc = (TD::messageVoiceNote *)pBody;
|