Disable edit time limit for reply markup in other's channel messages.
GitOrigin-RevId: 0532b9f3283981a2558b6c2698ae21cf7610897a
This commit is contained in:
parent
5e8be86d9f
commit
b09c7632c1
@ -16798,7 +16798,6 @@ bool MessagesManager::can_edit_message(DialogId dialog_id, const Message *m, boo
|
||||
bool has_edit_time_limit = !(is_bot && m->is_outgoing) && dialog_id != my_dialog_id &&
|
||||
content_type != MessageContentType::Poll &&
|
||||
content_type != MessageContentType::LiveLocation;
|
||||
|
||||
switch (dialog_id.get_type()) {
|
||||
case DialogType::User:
|
||||
if (!m->is_outgoing && dialog_id != my_dialog_id) {
|
||||
@ -16822,6 +16821,9 @@ bool MessagesManager::can_edit_message(DialogId dialog_id, const Message *m, boo
|
||||
if (!channel_status.can_edit_messages() && !(channel_status.can_post_messages() && m->is_outgoing)) {
|
||||
return false;
|
||||
}
|
||||
if (is_bot && only_reply_markup) {
|
||||
has_edit_time_limit = false;
|
||||
}
|
||||
} else {
|
||||
if (!m->is_outgoing) {
|
||||
return false;
|
||||
@ -17530,7 +17532,7 @@ bool MessagesManager::can_set_game_score(DialogId dialog_id, const Message *m) c
|
||||
auto channel_id = dialog_id.get_channel_id();
|
||||
auto channel_status = td_->contacts_manager_->get_channel_status(channel_id);
|
||||
if (m->is_channel_post) {
|
||||
if (!channel_status.can_edit_messages() && (!channel_status.can_post_messages() || !m->is_outgoing)) {
|
||||
if (!channel_status.can_edit_messages() && !(channel_status.can_post_messages() && m->is_outgoing)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user