mirror of
https://github.com/Xtao-Labs/misskey2telegram.git
synced 2024-11-22 13:55:53 +00:00
fix: no repeat renote
This commit is contained in:
parent
14977c9e6b
commit
2408824848
@ -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} 完成")
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user