From 18dbbc69f46f9ba8a91525407569b19ce173bfbe Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Fri, 12 Jul 2019 16:54:41 +0200 Subject: [PATCH] Clean up stale data presence on a #newday command Data presence was not reset on a new day cleanup, while it is almost certainly stale at this point. Hopefully. Change-Id: Ifc4cdedf6c365f92e5ff001d1485c8fee21b396f --- README.rst | 3 ++- ptgbot/db.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9bd988e..c9ff2bf 100644 --- a/README.rst +++ b/README.rst @@ -182,7 +182,8 @@ You have to be a channel operator (+o) to use admin commands. Removes active entries for specified track(s) ~newday - Removes now/next/location entries, to be run at the start of a new day + Removes existing now/next/location/presence entries. This command is + meant to be run at the start of a new day ~motd LEVEL MESSAGE Adds a message of the day on top of the rendered page. Level must be one of diff --git a/ptgbot/db.py b/ptgbot/db.py index f944da0..5dc0e36 100644 --- a/ptgbot/db.py +++ b/ptgbot/db.py @@ -191,6 +191,7 @@ class PTGDataBase(): self.data['now'] = OrderedDict() self.data['next'] = OrderedDict() self.data['location'] = OrderedDict() + self.data['last_check_in'] = OrderedDict() self.clean_motd() def empty(self):