feat: implement appservices

this also reverts some stateres changes
This commit is contained in:
Timo Kösters
2020-12-08 10:33:44 +01:00
parent d62f17a91a
commit 6e5b35ea92
26 changed files with 696 additions and 584 deletions

View File

@@ -69,6 +69,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 2. Let the room creator join
@@ -93,6 +94,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 3. Power levels
@@ -137,6 +139,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 4. Events set by preset
@@ -176,6 +179,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 4.2 History Visibility
@@ -196,6 +200,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 4.3 Guest Access
@@ -224,6 +229,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// 5. Events listed in initial_state
@@ -246,6 +252,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
}
@@ -270,6 +277,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
}
@@ -291,6 +299,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
}
@@ -317,6 +326,7 @@ pub async fn create_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
}
@@ -407,6 +417,7 @@ pub async fn upgrade_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// Get the old room federations status
@@ -450,6 +461,7 @@ pub async fn upgrade_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// Join the new room
@@ -474,6 +486,7 @@ pub async fn upgrade_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
// Recommended transferable state events list from the specs
@@ -510,6 +523,7 @@ pub async fn upgrade_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
}
@@ -556,6 +570,7 @@ pub async fn upgrade_room_route(
&db.sending,
&db.admin,
&db.account_data,
&db.appservice,
)?;
db.flush().await?;