diff options
Diffstat (limited to 'LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs')
-rw-r--r-- | LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs b/LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs index 1a5d5f5..2ae9593 100644 --- a/LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs +++ b/LibMatrix/EventTypes/Spec/State/RoomPowerLevelEventData.cs @@ -7,34 +7,34 @@ namespace LibMatrix.EventTypes.Spec.State; [MatrixEvent(EventName = "m.room.power_levels")] public class RoomPowerLevelEventContent : EventContent { [JsonPropertyName("ban")] - public long? Ban { get; set; } // = 50; + public long? Ban { get; set; } = 50; [JsonPropertyName("events_default")] - public long EventsDefault { get; set; } // = 0; + public long EventsDefault { get; set; } = 0; [JsonPropertyName("events")] public Dictionary<string, long>? Events { get; set; } // = null!; [JsonPropertyName("invite")] - public long? Invite { get; set; } // = 50; + public long? Invite { get; set; } = 0; [JsonPropertyName("kick")] - public long? Kick { get; set; } // = 50; + public long? Kick { get; set; } = 50; [JsonPropertyName("notifications")] public NotificationsPL? NotificationsPl { get; set; } // = null!; [JsonPropertyName("redact")] - public long? Redact { get; set; } // = 50; + public long? Redact { get; set; } = 50; [JsonPropertyName("state_default")] - public long? StateDefault { get; set; } // = 50; + public long? StateDefault { get; set; } = 50; [JsonPropertyName("users")] public Dictionary<string, long>? Users { get; set; } // = null!; [JsonPropertyName("users_default")] - public long? UsersDefault { get; set; } // = 0; + public long? UsersDefault { get; set; } = 0; [Obsolete("Historical was a key related to MSC2716, a spec change on backfill that was dropped!", true)] [JsonIgnore] @@ -47,7 +47,7 @@ public class RoomPowerLevelEventContent : EventContent { } public bool IsUserAdmin(string userId) { - return Users.TryGetValue(userId, out var level) && level >= Events.Max(x=>x.Value); + return Users.TryGetValue(userId, out var level) && level >= Events.Max(x => x.Value); } public bool UserHasPermission(string userId, string eventType) { |