#factcheck (#261)

Like #fortune but to check facts.
remotes/1693045480750635534/spooky-22
Absinthe 2022-05-12 16:21:11 +02:00 committed by GitHub
parent 83415362b5
commit c3ae481048
1 changed files with 5 additions and 1 deletions

View File

@ -249,6 +249,10 @@ def sanitize(sanitized, alert=False, comment=False, edit=False):
sanitized = sanitized.replace('#fortune', '')
sanitized += '\n\n<p>' + choice(FORTUNE_REPLIES) + '</p>'
if '#factcheck' in sanitized:
sanitized = sanitized.replace('#factcheck', '')
sanitized += '\n\n<p>' + choice(FACTCHECK_REPLIES) + '</p>'
sanitized = sanitized.replace('&amp;','&')
sanitized = utm_regex.sub('', sanitized)
sanitized = utm_regex2.sub('', sanitized)
@ -328,4 +332,4 @@ def filter_emojis_only(title, edit=False, graceful=False):
signal.alarm(0)
if len(title) > 1500 and not graceful: abort(400)
else: return title
else: return title