diff --git a/db.py b/db.py index 41df113..60056bf 100644 --- a/db.py +++ b/db.py @@ -137,13 +137,14 @@ def startmsg(self): @property def replying_to(self): - if time() - self._last_seen > self._replying_to_expiration: # if admin wasn't here for a quite long time + if time() - self._replying_to_update > self._replying_to_expiration: # if admin wasn't here for a quite long time self._replying_to = None # ignore last replying_to return self._replying_to @replying_to.setter def replying_to(self, value): self._replying_to = value + self._replying_to_update = time() def update_last_seen(self): self._last_seen = time() diff --git a/proxy_bot.py b/proxy_bot.py index 6032b0d..595884f 100644 --- a/proxy_bot.py +++ b/proxy_bot.py @@ -479,6 +479,7 @@ def handle_all(message): types.InlineKeyboardButton(strings.btn.block, callback_data='user_block_{}'.format(user.id)), types.InlineKeyboardButton(strings.btn.reply, callback_data='reply_{}'.format(user.id)) ) + markup.add(types.InlineKeyboardButton(strings.btn.menu, callback_data='menu')) bot.send_message( # send it to admin my_id, text,