refactor: Fix errors in api/client/room/

This commit is contained in:
Ginger
2026-04-10 12:52:42 -04:00
parent 97a01a1500
commit a2f6141f4b
6 changed files with 181 additions and 135 deletions
+2 -3
View File
@@ -4,7 +4,6 @@ use ruma::{
events::{
StateEventType, TimelineEventType,
room::{
create::RoomCreateEventContent,
history_visibility::{HistoryVisibility, RoomHistoryVisibilityEventContent},
member::{MembershipState, RoomMemberEventContent},
},
@@ -64,7 +63,7 @@ pub async fn user_can_redact(
return Ok(is_own_event);
}
return Ok(false);
Ok(false)
}
/// Whether a user is allowed to see an event, based on
@@ -139,7 +138,7 @@ pub async fn user_can_invite(
self.services
.timeline
.create_hash_and_sign_event(
PduBuilder::state(
PartialPdu::state(
target_user.as_str(),
&RoomMemberEventContent::new(MembershipState::Invite),
),