Skip to content

Commit

Permalink
sdk-base: add Member::can_pin_or_unpin_event
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp authored and andybalaam committed Jul 26, 2024
1 parent 95637c5 commit 15bf675
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/matrix-sdk-base/src/rooms/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ impl RoomMember {
self.can_do_impl(|pls| pls.user_can_send_state(self.user_id(), state_type))
}

/// Whether this user can pin or unpin events based on the power levels.
pub fn can_pin_or_unpin_event(&self) -> bool {
self.can_send_state(StateEventType::RoomPinnedEvents)
}

/// Whether this user can notify everybody in the room by writing `@room` in
/// a message.
///
Expand Down

0 comments on commit 15bf675

Please sign in to comment.