in bots/incident-response-slackbot/incident_response_slackbot/db/database.py [0:0]
def add(self, user_id, message_ts):
"""
Add a new entry to the database. If the user_id already exists,
update the message timestamp. Otherwise, create a new entry.
"""
self.data = self._load_data()
self.data.setdefault(user_id, {})["message_ts"] = message_ts
self._save()