mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 04:53:01 +02: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
|
@ -35,7 +35,7 @@ pub(crate) async fn set_displayname_route(
|
|||
State(services): State<crate::State>,
|
||||
body: Ruma<set_display_name::v3::Request>,
|
||||
) -> Result<set_display_name::v3::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
let sender_user = body.sender_user();
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ pub(crate) async fn set_avatar_url_route(
|
|||
State(services): State<crate::State>,
|
||||
body: Ruma<set_avatar_url::v3::Request>,
|
||||
) -> Result<set_avatar_url::v3::Response> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
let sender_user = body.sender_user();
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue