Do not force can_send_media_messages if can_send_web_page_previews or can_send_other_messages.
GitOrigin-RevId: 59ef4847c76e287b8174ca77e2a1cd286f05b68f
This commit is contained in:
parent
798ac5e3df
commit
cd519a5863
@ -321,7 +321,7 @@ users total_count:int32 user_ids:vector<int32> = Users;
|
|||||||
//@can_send_messages True, if the user can send text messages, contacts, locations, and venues
|
//@can_send_messages True, if the user can send text messages, contacts, locations, and venues
|
||||||
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
||||||
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
||||||
//@can_send_other_messages True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_media_messages permissions
|
//@can_send_other_messages True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_messages permissions
|
||||||
//@can_add_web_page_previews True, if the user may add a web page preview to his messages. Implies can_send_messages permissions
|
//@can_add_web_page_previews True, if the user may add a web page preview to his messages. Implies can_send_messages permissions
|
||||||
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
||||||
//@can_invite_users True, if the user can invite new users to the chat
|
//@can_invite_users True, if the user can invite new users to the chat
|
||||||
|
@ -379,9 +379,9 @@ DialogParticipantStatus get_dialog_participant_status(const tl_object_ptr<td_api
|
|||||||
auto st = static_cast<const td_api::chatMemberStatusRestricted *>(status.get());
|
auto st = static_cast<const td_api::chatMemberStatusRestricted *>(status.get());
|
||||||
auto permissions = st->permissions_.get();
|
auto permissions = st->permissions_.get();
|
||||||
bool can_send_polls = permissions->can_send_polls_;
|
bool can_send_polls = permissions->can_send_polls_;
|
||||||
bool can_send_media = permissions->can_send_media_messages_ || permissions->can_send_other_messages_ ||
|
bool can_send_media = permissions->can_send_media_messages_;
|
||||||
permissions->can_add_web_page_previews_;
|
bool can_send_messages = permissions->can_send_messages_ || can_send_media || can_send_polls ||
|
||||||
bool can_send_messages = permissions->can_send_messages_ || can_send_media || can_send_polls;
|
permissions->can_send_other_messages_ || permissions->can_add_web_page_previews_;
|
||||||
return DialogParticipantStatus::Restricted(
|
return DialogParticipantStatus::Restricted(
|
||||||
st->is_member_, st->restricted_until_date_, can_send_messages, can_send_media,
|
st->is_member_, st->restricted_until_date_, can_send_messages, can_send_media,
|
||||||
permissions->can_send_other_messages_, permissions->can_send_other_messages_,
|
permissions->can_send_other_messages_, permissions->can_send_other_messages_,
|
||||||
@ -581,9 +581,9 @@ RestrictedRights get_restricted_rights(const tl_object_ptr<telegram_api::chatBan
|
|||||||
|
|
||||||
RestrictedRights get_restricted_rights(const td_api::object_ptr<td_api::chatPermissions> &permissions) {
|
RestrictedRights get_restricted_rights(const td_api::object_ptr<td_api::chatPermissions> &permissions) {
|
||||||
bool can_send_polls = permissions->can_send_polls_;
|
bool can_send_polls = permissions->can_send_polls_;
|
||||||
bool can_send_media = permissions->can_send_media_messages_ || permissions->can_send_other_messages_ ||
|
bool can_send_media = permissions->can_send_media_messages_;
|
||||||
permissions->can_add_web_page_previews_;
|
bool can_send_messages = permissions->can_send_messages_ || can_send_media || can_send_polls ||
|
||||||
bool can_send_messages = permissions->can_send_messages_ || can_send_media || can_send_polls;
|
permissions->can_send_other_messages_ || permissions->can_add_web_page_previews_;
|
||||||
return RestrictedRights(can_send_messages, can_send_media, permissions->can_send_other_messages_,
|
return RestrictedRights(can_send_messages, can_send_media, permissions->can_send_other_messages_,
|
||||||
permissions->can_send_other_messages_, permissions->can_send_other_messages_,
|
permissions->can_send_other_messages_, permissions->can_send_other_messages_,
|
||||||
permissions->can_send_other_messages_, permissions->can_add_web_page_previews_,
|
permissions->can_send_other_messages_, permissions->can_add_web_page_previews_,
|
||||||
|
Loading…
Reference in New Issue
Block a user