Aevann 2023-08-20 03:52:22 +03:00
parent 3e14e7a528
commit 49bc6bbba9
2 changed files with 5 additions and 6 deletions

View File

@ -156,7 +156,11 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
cost = 0
coin_receivers = set()
for i in group_mention_regex.finditer(text):
groups = group_mention_regex.finditer(text)
if len(list(groups)) > 5:
abort(403, "You can only ping a maximum of 5 ping groups!")
for i in groups:
if oldtext and i.group(1) in oldtext:
continue

View File

@ -420,11 +420,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
if not sanitized: return ''
if FEATURES['PING_GROUPS']:
ping_group_count = len(list(group_mention_regex.finditer(sanitized)))
if ping_group_count > 5:
error("You can only ping a maximum of 5 ping groups!")
if blackjack and execute_blackjack(g.v, None, sanitized, blackjack):
sanitized = 'g'