mirror of
https://git.kiwifarms.net/mint/ebooks.git
synced 2024-10-22 19:19:05 +00:00
Few more fixes
This commit is contained in:
parent
e11f386caa
commit
f641af96d8
1 changed files with 4 additions and 3 deletions
7
reply.py
7
reply.py
|
@ -80,7 +80,7 @@ class ReplyBot:
|
|||
try:
|
||||
status = await self.pleroma.get_status(argument)
|
||||
if status['content'] != "":
|
||||
keywords = cleanup_toot(utils.extract_post_content(status['content']), self.cfg)
|
||||
keywords = self.cleanup_toot(utils.extract_post_content(status['content']), self.cfg)
|
||||
else:
|
||||
keywords = None
|
||||
|
||||
|
@ -88,8 +88,9 @@ class ReplyBot:
|
|||
toot = self.cleanup_toot(toot, self.cfg)
|
||||
await self.pleroma.reply(status, toot, cw=self.cfg['cw'])
|
||||
except:
|
||||
tg.start_soon(self.pleroma.react, post_id, '❌')
|
||||
tg.start_soon(self.pleroma.reply, notification['status'], 'Error: ' + exc.args[0])
|
||||
async with anyio.create_task_group() as tg:
|
||||
tg.start_soon(self.pleroma.react, post_id, '❌')
|
||||
tg.start_soon(self.pleroma.reply, notification['status'], 'Error: ' + exc.args[0])
|
||||
except pleroma.BadRequest as exc:
|
||||
async with anyio.create_task_group() as tg:
|
||||
tg.start_soon(self.pleroma.react, post_id, '❌')
|
||||
|
|
Loading…
Reference in a new issue