remove any generated @'s in replies to prevent accidentally mentioning somebody else on the same instance

This commit is contained in:
autumn 2023-03-05 21:33:59 +00:00
parent 03305c4a55
commit 59e9efe118
2 changed files with 4 additions and 0 deletions

View file

@ -82,6 +82,7 @@ class ReplyBot:
async def reply(self, notification):
toot = await utils.make_post(self.cfg) # generate a toot
toot = re.sub(r"@\S+\s", r"", toot) # remove any generated @'s
await self.pleroma.reply(notification['status'], toot, cw=self.cfg['cw'])
@staticmethod