mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-30 03:38:31 +00:00
Modernize various sender_user/sender_device lets.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d6aa03ea73
commit
49f7a2487f
20 changed files with 69 additions and 90 deletions
|
@ -249,14 +249,14 @@ pub(crate) async fn join_room_by_id_or_alias_route(
|
|||
InsecureClientIp(client): InsecureClientIp,
|
||||
body: Ruma<join_room_by_id_or_alias::v3::Request>,
|
||||
) -> Result<join_room_by_id_or_alias::v3::Response> {
|
||||
let sender_user = body.sender_user.as_deref().expect("user is authenticated");
|
||||
let sender_user = body.sender_user();
|
||||
let appservice_info = &body.appservice_info;
|
||||
let body = body.body;
|
||||
let body = &body.body;
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
||||
let (servers, room_id) = match OwnedRoomId::try_from(body.room_id_or_alias) {
|
||||
let (servers, room_id) = match OwnedRoomId::try_from(body.room_id_or_alias.clone()) {
|
||||
| Ok(room_id) => {
|
||||
banned_room_check(
|
||||
&services,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue