diff --git a/lib/common/src/version.h b/lib/common/src/version.h index 9673af3b..91ac4e88 100644 --- a/lib/common/src/version.h +++ b/lib/common/src/version.h @@ -7,4 +7,4 @@ #pragma once -#define NCHAT_VERSION "5.2.11" +#define NCHAT_VERSION "5.3.1" diff --git a/lib/tgchat/src/tgchat.cpp b/lib/tgchat/src/tgchat.cpp index d6143e1b..5a1365e8 100644 --- a/lib/tgchat/src/tgchat.cpp +++ b/lib/tgchat/src/tgchat.cpp @@ -2356,7 +2356,28 @@ void TgChat::Impl::TdMessageContentConvert(td::td_api::MessageContent& p_TdMessa } else if (p_TdMessageContent.get_id() == td::td_api::messageAnimation::ID) { - p_Text = "[Animation]"; + auto& messageAnimation = static_cast(p_TdMessageContent); + auto& animation = messageAnimation.animation_; + p_Text = GetText(std::move(messageAnimation.caption_)); + + auto& animationFile = animation->animation_; + auto& localFile = animationFile->local_; + auto& localPath = localFile->path_; + FileInfo fileInfo; + std::string id = animationFile->remote_->id_; + fileInfo.fileId = id; + if (!localPath.empty()) + { + fileInfo.filePath = localPath; + fileInfo.fileStatus = FileStatusDownloaded; + } + else + { + fileInfo.filePath = "[Animation]"; + fileInfo.fileStatus = FileStatusNotDownloaded; + } + + p_FileInfo = ProtocolUtil::FileInfoToHex(fileInfo); } else if (p_TdMessageContent.get_id() == td::td_api::messageAudio::ID) { diff --git a/src/nchat.1 b/src/nchat.1 index 22f3f6b5..c4f00257 100644 --- a/src/nchat.1 +++ b/src/nchat.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH NCHAT "1" "September 2024" "nchat 5.2.11" "User Commands" +.TH NCHAT "1" "September 2024" "nchat 5.3.1" "User Commands" .SH NAME nchat \- ncurses chat .SH SYNOPSIS