Increase maximum allowed value for mute_for.
This commit is contained in:
parent
b5468e4cac
commit
06b10526f1
@ -5386,7 +5386,7 @@ setChatTheme chat_id:int53 theme_name:string = Ok;
|
||||
setChatDraftMessage chat_id:int53 message_thread_id:int53 draft_message:draftMessage = Ok;
|
||||
|
||||
//@description Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed
|
||||
//@chat_id Chat identifier @notification_settings New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever
|
||||
//@chat_id Chat identifier @notification_settings New notification settings for the chat. If the chat is muted for more than 366 days, it is considered to be muted forever
|
||||
setChatNotificationSettings chat_id:int53 notification_settings:chatNotificationSettings = Ok;
|
||||
|
||||
//@description Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges
|
||||
|
@ -119,7 +119,7 @@ static int32 get_mute_until(int32 mute_for) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int32 MAX_PRECISE_MUTE_FOR = 7 * 86400;
|
||||
const int32 MAX_PRECISE_MUTE_FOR = 366 * 86400;
|
||||
int32 current_time = G()->unix_time();
|
||||
if (mute_for > MAX_PRECISE_MUTE_FOR || mute_for >= std::numeric_limits<int32>::max() - current_time) {
|
||||
return std::numeric_limits<int32>::max();
|
||||
|
Loading…
Reference in New Issue
Block a user