Support chatMemberStatusMember.member_until_date.

This commit is contained in:
levlam 2024-08-13 15:28:48 +03:00
parent 3c4656b539
commit e171396b8a

View File

@ -3710,8 +3710,13 @@ class Client::JsonChatMember final : public td::Jsonable {
} }
break; break;
} }
case td_api::chatMemberStatusMember::ID: case td_api::chatMemberStatusMember::ID: {
auto member = static_cast<const td_api::chatMemberStatusMember *>(member_->status_.get());
if (member->member_until_date_ > 0) {
object("until_date", member->member_until_date_);
}
break; break;
}
case td_api::chatMemberStatusRestricted::ID: case td_api::chatMemberStatusRestricted::ID:
if (chat_type_ == Client::ChatType::Supergroup) { if (chat_type_ == Client::ChatType::Supergroup) {
auto restricted = static_cast<const td_api::chatMemberStatusRestricted *>(member_->status_.get()); auto restricted = static_cast<const td_api::chatMemberStatusRestricted *>(member_->status_.get());