fix last hashtag detection
This commit is contained in:
parent
186450d1c7
commit
48bb352d11
1 changed files with 2 additions and 2 deletions
|
@ -240,9 +240,9 @@ class DelojzaBot:
|
||||||
def get_hashtags(self, message):
|
def get_hashtags(self, message):
|
||||||
hashtags = self.extract_hashtags(message)
|
hashtags = self.extract_hashtags(message)
|
||||||
if len(hashtags) == 0 and self.last_hashtags is not None:
|
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):
|
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
|
return hashtags
|
||||||
|
|
||||||
def tg_handle_hashtag(self, bot, update):
|
def tg_handle_hashtag(self, bot, update):
|
||||||
|
|
Loading…
Reference in a new issue