From 931297dc7bbee63632c6cbbd3108452ed37aee2c Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 27 Jun 2024 14:16:47 +0300 Subject: [PATCH] fix this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/6562218#context --- files/helpers/sanitize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 7bd474e0a..cb462df5a 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -386,7 +386,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis names = set(m.group(1) for m in mention_regex.finditer(sanitized)) - if limit_pings and len(names) > limit_pings and v.admin_level < PERMS['POST_COMMENT_INFINITE_PINGS']: + if limit_pings and len(names) > limit_pings and author and author.admin_level < PERMS['POST_COMMENT_INFINITE_PINGS']: return error("Max ping limit is 5 for comments and 50 for posts!") users_list = get_users(names, graceful=True)