From 48bb352d11c403cea41c6afb56a97c57bd1aadee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 19 May 2019 11:11:27 +0200 Subject: [PATCH] fix last hashtag detection --- delojza.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/delojza.py b/delojza.py index 07f7910..e4cab82 100755 --- a/delojza.py +++ b/delojza.py @@ -240,9 +240,9 @@ class DelojzaBot: def get_hashtags(self, message): hashtags = self.extract_hashtags(message) if len(hashtags) == 0 and self.last_hashtags is not None: - user, chat, ts, hashtags = self.last_hashtags + user, chat, ts, last_hashtags = self.last_hashtags if user == message.from_user and chat == message.chat and ts > datetime.now() - timedelta(hours=1): - hashtags = self.last_hashtags[1] + hashtags = last_hashtags return hashtags def tg_handle_hashtag(self, bot, update):