Commit 43106190 authored by Jack'lul's avatar Jack'lul

Fix case when handling channel messages

parent 8e5308c2
......@@ -1064,8 +1064,8 @@ class Request
$requests = DB::getTelegramRequestCount($chat_id, $inline_message_id);
if ($requests['LIMIT_PER_SEC'] == 0 // No more than one message per second inside a particular chat
&& ((($chat_id > 0 || $inline_message_id) && $requests['LIMIT_PER_SEC_ALL'] < 30) // No more than 30 messages per second globally
|| ($chat_id < 0 && $requests['LIMIT_PER_MINUTE'] < 20)) // No more than 20 messages per minute in groups and channels
&& ((!is_numeric($chat_id) || $chat_id > 0 || $inline_message_id) && $requests['LIMIT_PER_SEC_ALL'] < 30) // No more than 30 messages per second globally
|| ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20) // No more than 20 messages per minute in groups and channels
) {
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment