mirror of
https://github.com/ioistired/pleroma-ebooks.git
synced 2025-01-08 17:44:45 +01:00
apply configuration to replies
This commit is contained in:
parent
03305c4a55
commit
77b69712d0
4
reply.py
4
reply.py
@ -82,6 +82,10 @@ class ReplyBot:
|
||||
|
||||
async def reply(self, notification):
|
||||
toot = await utils.make_post(self.cfg) # generate a toot
|
||||
if self.cfg['strip_paired_punctuation']:
|
||||
toot = PAIRED_PUNCTUATION.sub("", toot)
|
||||
toot = toot.replace("@", "@\u200b") # sanitize mentions
|
||||
toot = utils.remove_mentions(self.cfg, toot)
|
||||
await self.pleroma.reply(notification['status'], toot, cw=self.cfg['cw'])
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user