Skip to content

Commit

Permalink
fix incorrect user id for non-admin invites checking
Browse files Browse the repository at this point in the history
  • Loading branch information
overphoenix committed Nov 10, 2024
1 parent 16014e1 commit b4aaa42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/client/membership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ pub(crate) async fn invite_helper(
services: &Services, sender_user: &UserId, user_id: &UserId, room_id: &RoomId, reason: Option<String>,
is_direct: bool,
) -> Result<()> {
if !services.users.is_admin(user_id)? && services.globals.block_non_admin_invites() {
if !services.users.is_admin(sender_user)? && services.globals.block_non_admin_invites() {
info!("User {sender_user} is not an admin and attempted to send an invite to room {room_id}");
return Err(Error::BadRequest(
ErrorKind::forbidden(),
Expand Down

0 comments on commit b4aaa42

Please sign in to comment.