diff --git a/active_bots/telegrambot.py b/active_bots/telegrambot.py index e43b5bd..722ce17 100644 --- a/active_bots/telegrambot.py +++ b/active_bots/telegrambot.py @@ -28,12 +28,12 @@ class TelegramBot(Bot): tb.send_message(update.message.sender.id, "You are now unsubscribed from report notifications.") # TODO: /stop message should be set in frontend elif update.message.text.lower() == "/help": - tb.send_message(update.message.sender.id, "Send reports here to share them with other users. Use /start and /stop to be included/excluded.") + tb.send_message(update.message.sender.id, "Send reports here to share them with other users. Use /start and /stop to get reports or not.") # TODO: /help message should be set in frontend else: reports.append(Report(update.message.sender.username, self, update.message.text, None, update.message.date)) - user.save_seen_tg(update.message.id) + user.save_seen_tg(update.update_id) except AttributeError: print(updates[0], updates[1]) # Telegram API returns an Error return reports diff --git a/user.py b/user.py index 92e8657..da7ffe5 100644 --- a/user.py +++ b/user.py @@ -187,7 +187,7 @@ schlitz def get_seen_tg(self): db.execute("SELECT tg_id FROM seen_telegrams WHERE user_id = ?;", (self.uid,)) - return db.cur.fetchone() + return db.cur.fetchone()[0] def save_seen_tg(self, tg_id): db.execute("UPDATE seen_telegrams SET tg_id = ? WHERE user_id = ?;",