remove any generated @'s in replies to prevent accidentally mentioning somebody else on the same instance
This commit is contained in:
parent
03305c4a55
commit
59e9efe118
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
# pleroma-ebooks
|
||||
|
||||
this is a very slightly modified version of <https://github.com/ioistired/pleroma-ebooks>
|
||||
current changes: removes any generated @'s in replies to prevent accidentally mentioning somebody else on the same instance
|
||||
|
||||
It's like [@AgathaSorceress's mstdn-ebooks] but it supports Pleroma better.
|
||||
|
||||
[@AgathaSorceress's mstdn-ebooks]: https://github.com/AgathaSorceress/mstdn-ebooks
|
||||
|
|
1
reply.py
1
reply.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue