Fix mention stripping in reply script

This commit is contained in:
Mint 2022-07-05 00:56:10 +03:00
parent f453a7e96c
commit bdb3a12979

View file

@ -76,6 +76,7 @@ class ReplyBot:
def extract_toot(toot): def extract_toot(toot):
text = utils.extract_post_content(toot) text = utils.extract_post_content(toot)
text = re.sub(r"^@\S+\s", r"", text) # remove the initial mention text = re.sub(r"^@\S+\s", r"", text) # remove the initial mention
text = utils.remove_mentions(cfg, text)
text = text.lower() # treat text as lowercase for easier keyword matching (if this bot uses it) text = text.lower() # treat text as lowercase for easier keyword matching (if this bot uses it)
return text return text