From 93aec5ed341fc0ff0112ff98c148b0388050f6ba Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sun, 29 Nov 2020 21:37:01 +0000 Subject: [PATCH] Update 'Feature: Room State Management' --- Feature%3A-Room-State-Management.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Feature%3A-Room-State-Management.md b/Feature%3A-Room-State-Management.md index da870a9..3eaa212 100644 --- a/Feature%3A-Room-State-Management.md +++ b/Feature%3A-Room-State-Management.md @@ -65,6 +65,14 @@ Need to utilize `on_room_member` event for this: * When the bot joins a room for the first time, in addition to recording all users, it should also record information about the room itself. +### Architecture Changes + +Implementation of a new resync command, and common code used by both the room member changed event and execution of this command. + ## Implementation -Most functionality is in a new database object `Rooms`. Keep track of users and the rooms they are in, both by username to a list of room IDs, and a room ID to list of usernames. It will also keep track of actual room information and other useful stuff. +Most functionality is in a new database object `Rooms`. It contains all functions for storing information about rooms and users. + +The code is being reorganized to support a new command called resync. + +A new "business logic" layer needs to be created that can do things like update room info. This is because it might be called from a command, event handler, or even bot startup.