state-res: Add some docs and fix a typo
This commit is contained in:
parent
0e1cf5b3f6
commit
bdce12b07e
@ -161,7 +161,7 @@ impl Restricted {
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum AllowRule {
|
||||
/// Joining is allowed if a user is already a member of the romm with the id `room_id`.
|
||||
/// Joining is allowed if a user is already a member of the room with the id `room_id`.
|
||||
#[serde(rename = "m.room_membership")]
|
||||
RoomMembership(RoomMembership),
|
||||
|
||||
|
@ -331,6 +331,10 @@ struct PowerLevelsContentFields {
|
||||
}
|
||||
|
||||
/// Find the power level for the sender of `event_id` or return a default value of zero.
|
||||
///
|
||||
/// Do NOT use this any where but topological sort, we find the power level for the eventId
|
||||
/// at the eventId's generation (we walk backwards to `EventId`s most recent previous power level
|
||||
/// event).
|
||||
fn get_power_level_for_sender<E: Event>(
|
||||
event_id: &EventId,
|
||||
fetch_event: impl Fn(&EventId) -> Option<E>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user