remove unnecessary displayname requirement on making user admin

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-09-09 21:10:56 -04:00
parent 55f71d3912
commit 9de780b56c
3 changed files with 4 additions and 15 deletions

View file

@ -21,7 +21,7 @@ impl super::Service {
/// Invite the user to the conduit admin room.
///
/// In conduit, this is equivalent to granting admin privileges.
pub async fn make_user_admin(&self, user_id: &UserId, displayname: String) -> Result<()> {
pub async fn make_user_admin(&self, user_id: &UserId) -> Result<()> {
let Some(room_id) = self.get_admin_room()? else {
return Ok(());
};
@ -65,7 +65,7 @@ impl super::Service {
event_type: TimelineEventType::RoomMember,
content: to_raw_value(&RoomMemberEventContent {
membership: MembershipState::Join,
displayname: Some(displayname),
displayname: None,
avatar_url: None,
is_direct: None,
third_party_invite: None,