fix: no repeat renote

This commit is contained in:
xtaodada 2023-07-29 13:51:14 +08:00
parent 14977c9e6b
commit 2408824848
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 3 additions and 1 deletions

View File

@ -84,6 +84,8 @@ class MisskeyBot(commands.Bot):
self.tg_user.host, self.tg_user.push_chat_id, note, None, False
)
await RevokeAction.push(self.tg_user.user_id, note.id, msgs)
else:
logs.info(f"{self.tg_user.user_id} 跳过重复转发 note {note.id}")
await NoRepeatRenoteAction.set(self.tg_user.user_id, note)
logs.info(f"{self.tg_user.user_id} 处理 note {note.id} 完成")

View File

@ -17,7 +17,7 @@ class NoRepeatRenoteAction:
@staticmethod
async def check(uid: int, note: Note):
if note.renote and (not note.content):
if NoRepeatRenoteAction.get(uid, note.renote.id):
if await NoRepeatRenoteAction.get(uid, note.renote.id):
return False
return True