Fix skipping of length checks by hotfix

This commit is contained in:
archfan 2021-05-31 18:50:48 +00:00 committed by GitHub
parent e74006c9b7
commit f543fa4896
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ async def handle(request):
if data['type'] == 'DISCORD-RELAY-MESSAGE':
msg = discord.utils.escape_mentions(data['content'])[0:2000]
r = re.compile(r'\x1b(T|F|E|\(T@[^\)]*\))')
msg = r.sub('', data['content'])
msg = r.sub('', msg)
if 'context' in data.keys():
id = int(data['context'])
user = await get_or_fetch_user(id)