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

Show author for messages in channel as "Channel post"

Rather than "someone"
This commit is contained in:
Arseniy Lartsev
2020-08-13 13:40:34 +02:00
parent 8888e025b6
commit 9ecc3c94d5
2 changed files with 26 additions and 0 deletions

View File

@@ -578,6 +578,8 @@ std::string getSenderPurpleName(const td::td_api::chat &chat, const td::td_api::
return account.getDisplayName(message.sender_user_id_);
else if (!message.author_signature_.empty())
return message.author_signature_;
else if (message.is_channel_post_)
return _("Channel post");
else if (message.forward_info_ && message.forward_info_->origin_)
switch (message.forward_info_->origin_->get_id()) {
case td::td_api::messageForwardOriginUser::ID: