diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
commit | 712ad189c99570f686ab779782b2a873e172428e (patch) | |
tree | 6102e4719416e71522e9143fa4e06951258bd77c /MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs | |
parent | Fix passwords being visible during editing (diff) | |
download | MatrixUtils-712ad189c99570f686ab779782b2a873e172428e.tar.xz |
Change syntax style
Diffstat (limited to 'MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs')
-rw-r--r-- | MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs b/MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs index a927ace..6f6d082 100644 --- a/MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs +++ b/MatrixRoomUtils.Core/StateEventTypes/PolicyRuleStateEventData.cs @@ -2,51 +2,50 @@ using System.Text.Json.Serialization; namespace MatrixRoomUtils.Core.StateEventTypes; -public class PolicyRuleStateEventData -{ +public class PolicyRuleStateEventData { /// <summary> - /// Entity this ban applies to, can use * and ? as globs. + /// Entity this ban applies to, can use * and ? as globs. /// </summary> [JsonPropertyName("entity")] public string Entity { get; set; } + /// <summary> - /// Reason this user is banned + /// Reason this user is banned /// </summary> [JsonPropertyName("reason")] public string? Reason { get; set; } + /// <summary> - /// Suggested action to take + /// Suggested action to take /// </summary> [JsonPropertyName("recommendation")] public string? Recommendation { get; set; } /// <summary> - /// Expiry time in milliseconds since the unix epoch, or null if the ban has no expiry. + /// Expiry time in milliseconds since the unix epoch, or null if the ban has no expiry. /// </summary> [JsonPropertyName("support.feline.policy.expiry.rev.2")] //stable prefix: expiry, msc pending public long? Expiry { get; set; } - - + //utils /// <summary> - /// Readable expiry time, provided for easy interaction + /// Readable expiry time, provided for easy interaction /// </summary> [JsonPropertyName("gay.rory.matrix_room_utils.readable_expiry_time_utc")] - public DateTime? ExpiryDateTime - { + public DateTime? ExpiryDateTime { get => Expiry == null ? null : DateTimeOffset.FromUnixTimeMilliseconds(Expiry.Value).DateTime; - set => Expiry = ((DateTimeOffset) value).ToUnixTimeMilliseconds(); + set => Expiry = ((DateTimeOffset)value).ToUnixTimeMilliseconds(); } } -public static class PolicyRecommendationTypes -{ +public static class PolicyRecommendationTypes { /// <summary> - /// Ban this user + /// Ban this user /// </summary> public static string Ban = "m.ban"; + /// <summary> - /// Mute this user + /// Mute this user /// </summary> public static string Mute = "support.feline.policy.recommendation_mute"; //stable prefix: m.mute, msc pending } \ No newline at end of file |