Update 'Feature: Room State Management'
parent
2388b5e076
commit
1c1baa3242
|
@ -0,0 +1,15 @@
|
|||
# Room State Management
|
||||
|
||||
Planning and design of the room state management "feature."
|
||||
|
||||
* The bot must keep track of rooms it is in, and what users are in each room.
|
||||
|
||||
## Bot Changes
|
||||
|
||||
Listen to Matrix event for when users enter and leave rooms. This is easily accomplished with the `on_room_member` event. When the bot joins a room for the first time, member events are fired for every member in the room. It seems to sync everything, so you will get a join and leave notification many times, potentially.
|
||||
|
||||
The bot does not get membership events from other users when leaving a room. Instead, it will get a member event of leaving the room for itself. In that circumstance, it should delete all user information in the database for the room.
|
||||
|
||||
## Database Changes
|
||||
|
||||
New DB object `Rooms`. Trees for room -> list of users, and maybe user -> list of rooms. We need user -> list of rooms for easy implementation of private conversation command execution.
|
Loading…
Reference in New Issue