1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-07-22 17:18:35 +00:00

feat: knocking

You may notice that we do no database migration for populating the state cache for knocking.
This is because that in all the places where we use the state cache, it doesn't make a difference:
- For local users, the clients wouldn't have been able to knock on rooms, as the `/knock`
  endpoint wasn't implemented yet, and I am not aware of any client which tries to knock over
  `/state`, as it would fail if the server is not currently in the room
- It is not used for remote users
This commit is contained in:
Matthias Ahouansou 2025-03-01 19:17:37 +00:00
parent f4d90e9989
commit 21af83ea72
No known key found for this signature in database
15 changed files with 1362 additions and 867 deletions

View file

@ -99,6 +99,8 @@ pub struct KeyValueDatabase {
pub(super) roomuseroncejoinedids: Arc<dyn KvTree>,
pub(super) userroomid_invitestate: Arc<dyn KvTree>, // InviteState = Vec<Raw<AnyStrippedStateEvent>>
pub(super) roomuserid_invitecount: Arc<dyn KvTree>, // InviteCount = Count
pub(super) userroomid_knockstate: Arc<dyn KvTree>, // KnockState = Vec<Raw<AnyStrippedStateEvent>>
pub(super) roomuserid_knockcount: Arc<dyn KvTree>, // KnockCount = Count
pub(super) userroomid_leftstate: Arc<dyn KvTree>,
pub(super) roomuserid_leftcount: Arc<dyn KvTree>,
@ -313,6 +315,8 @@ impl KeyValueDatabase {
roomuseroncejoinedids: builder.open_tree("roomuseroncejoinedids")?,
userroomid_invitestate: builder.open_tree("userroomid_invitestate")?,
roomuserid_invitecount: builder.open_tree("roomuserid_invitecount")?,
userroomid_knockstate: builder.open_tree("userroomid_knockstate")?,
roomuserid_knockcount: builder.open_tree("roomuserid_knockcount")?,
userroomid_leftstate: builder.open_tree("userroomid_leftstate")?,
roomuserid_leftcount: builder.open_tree("roomuserid_leftcount")?,