From 24088248487c1472581f2918e76f5f9cfe3932f8 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 29 Jul 2023 13:51:14 +0800 Subject: [PATCH] fix: no repeat renote --- misskey_init.py | 2 ++ models/services/no_repeat_renote.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/misskey_init.py b/misskey_init.py index 7e3d6cd..59bd7fc 100644 --- a/misskey_init.py +++ b/misskey_init.py @@ -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} 完成") diff --git a/models/services/no_repeat_renote.py b/models/services/no_repeat_renote.py index 2745d81..7bc8660 100644 --- a/models/services/no_repeat_renote.py +++ b/models/services/no_repeat_renote.py @@ -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