From ab0ba513bfd63941a7d2205631fa20984e912207 Mon Sep 17 00:00:00 2001 From: n9k Date: Wed, 20 Jul 2022 07:36:06 +0000 Subject: [PATCH] Emotes: emotes must have non-empty names --- anonstream/utils/chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/anonstream/utils/chat.py b/anonstream/utils/chat.py index 6a50fd0..abc9e13 100644 --- a/anonstream/utils/chat.py +++ b/anonstream/utils/chat.py @@ -34,6 +34,7 @@ def get_approx_linespan(text): def schema_to_emotes(schema): emotes = [] for name, coords in schema.items(): + assert emote['name'], 'emote names cannot be empty' assert not re.search(r'\s', name), \ 'whitespace is not allowed in emote names' name_markup = escape(name)