From 94b2fde5a991b9fa103be2bc8be99e2788c9787f Mon Sep 17 00:00:00 2001 From: lifegpc Date: Sun, 22 Jan 2023 08:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E4=B8=8D=E5=90=8CCh?= =?UTF-8?q?at=E4=BD=BF=E7=94=A8rsslist=E8=8F=9C=E5=8D=95=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=AF=9D=E9=A2=98=E5=90=8E=E8=8F=9C=E5=8D=95=E6=9C=AA=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rssbot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rssbot.py b/rssbot.py index 7474794..3b2d05b 100644 --- a/rssbot.py +++ b/rssbot.py @@ -1399,6 +1399,10 @@ class messageHandle(Thread): messageId = int(hashd[2]) ind = int(hashd[3]) rssId = int(hashd[4]) + try: + fromChatId = int(hashd[5]) + except Exception: + fromChatId = chatId rssEntry = self._main._db.getRSSByIdAndChatId(rssId, chatId) if rssEntry is None: self._main._db.setUserStatus( @@ -1428,7 +1432,7 @@ class messageHandle(Thread): self._main._request('sendMessage', 'post', json=di) return self._main._request('sendMessage', 'post', json=di) - di2 = {'chat_id': chatId, 'message_id': messageId} + di2 = {'chat_id': fromChatId, 'message_id': messageId} di2['text'] = getTextContentForRSSInList(rssEntry, self._main._setting) di2['parse_mode'] = 'HTML' di2['reply_markup'] = getInlineKeyBoardForRSSThreadIdsInList(