about summary refs log tree commit diff
path: root/LibMatrix/StateEventTypes/Spec
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/StateEventTypes/Spec')
-rw-r--r--LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs12
-rw-r--r--LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs2
-rw-r--r--LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs5
-rw-r--r--LibMatrix/StateEventTypes/Spec/ProfileResponseEventData.cs4
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs2
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs26
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs2
-rw-r--r--LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs1
21 files changed, 53 insertions, 14 deletions
diff --git a/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs b/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
index 36cc90e..384ca43 100644
--- a/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs b/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
index b6ddd93..eadba67 100644
--- a/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs b/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
index 8836fc0..1c73346 100644
--- a/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
index 0393395..d3da559 100644
--- a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
@@ -1,5 +1,7 @@
+using System.Collections.Generic;
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
@@ -14,5 +16,13 @@ public class JoinRulesEventData : IStateEventType {
     public string JoinRule { get; set; }
 
     [JsonPropertyName("allow")]
-    public List<string> Allow { get; set; }
+    public List<AllowEntry> Allow { get; set; }
+
+    public class AllowEntry {
+        [JsonPropertyName("type")]
+        public string Type { get; set; }
+
+        [JsonPropertyName("room_id")]
+        public string RoomId { get; set; }
+    }
 }
diff --git a/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs b/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
index 963864f..c0aed9e 100644
--- a/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
@@ -1,5 +1,7 @@
+using System;
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs b/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
index fa75a88..c5a95ae 100644
--- a/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
@@ -14,4 +15,8 @@ public class PresenceStateEventData : IStateEventType {
     public bool CurrentlyActive { get; set; }
     [JsonPropertyName("status_msg")]
     public string StatusMessage { get; set; }
+    [JsonPropertyName("avatar_url")]
+    public string AvatarUrl { get; set; }
+    [JsonPropertyName("displayname")]
+    public string DisplayName { get; set; }
 }
diff --git a/LibMatrix/StateEventTypes/Spec/ProfileResponseEventData.cs b/LibMatrix/StateEventTypes/Spec/ProfileResponseEventData.cs
index d2340f5..14449e0 100644
--- a/LibMatrix/StateEventTypes/Spec/ProfileResponseEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/ProfileResponseEventData.cs
@@ -5,8 +5,8 @@ namespace LibMatrix.StateEventTypes.Spec;
 
 public class ProfileResponseEventData : IStateEventType {
     [JsonPropertyName("avatar_url")]
-    public string? AvatarUrl { get; set; } = "";
+    public string? AvatarUrl { get; set; }
 
     [JsonPropertyName("displayname")]
-    public string? DisplayName { get; set; } = "";
+    public string? DisplayName { get; set; }
 }
diff --git a/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
index 8d921b2..df80a08 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
@@ -1,5 +1,7 @@
+using System.Collections.Generic;
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
index cbe41dd..4d3fabf 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
index b96c31e..0b1bd5c 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
index e16716e..126117d 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
index 623c43c..7c181ae 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
index 14dd67a..5d65237 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
index 9d13513..2245793 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
index c7d29fa..10ef3f5 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
index c5dda78..3c985f6 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
@@ -1,5 +1,9 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
@@ -7,43 +11,43 @@ namespace LibMatrix.StateEventTypes.Spec;
 [MatrixEvent(EventName = "m.room.power_levels")]
 public class RoomPowerLevelEventData : IStateEventType {
     [JsonPropertyName("ban")]
-    public int Ban { get; set; } // = 50;
+    public long Ban { get; set; } // = 50;
 
     [JsonPropertyName("events_default")]
-    public int EventsDefault { get; set; } // = 0;
+    public long EventsDefault { get; set; } // = 0;
 
     [JsonPropertyName("events")]
-    public Dictionary<string, int> Events { get; set; } // = null!;
+    public Dictionary<string, long> Events { get; set; } // = null!;
 
     [JsonPropertyName("invite")]
-    public int Invite { get; set; } // = 50;
+    public long Invite { get; set; } // = 50;
 
     [JsonPropertyName("kick")]
-    public int Kick { get; set; } // = 50;
+    public long Kick { get; set; } // = 50;
 
     [JsonPropertyName("notifications")]
     public NotificationsPL NotificationsPl { get; set; } // = null!;
 
     [JsonPropertyName("redact")]
-    public int Redact { get; set; } // = 50;
+    public long Redact { get; set; } // = 50;
 
     [JsonPropertyName("state_default")]
-    public int StateDefault { get; set; } // = 50;
+    public long StateDefault { get; set; } // = 50;
 
     [JsonPropertyName("users")]
-    public Dictionary<string, int> Users { get; set; } // = null!;
+    public Dictionary<string, long> Users { get; set; } // = null!;
 
     [JsonPropertyName("users_default")]
-    public int 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]
     [JsonPropertyName("historical")]
-    public int Historical { get; set; } // = 50;
+    public long Historical { get; set; } // = 50;
 
     public class NotificationsPL {
         [JsonPropertyName("room")]
-        public int Room { get; set; } = 50;
+        public long Room { get; set; } = 50;
     }
 
     public bool IsUserAdmin(string userId) {
diff --git a/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
index 0fd0df6..eaf9e8c 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
index 857338c..cebb238 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs b/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
index 68bbe6b..a258707 100644
--- a/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
@@ -1,5 +1,7 @@
+using System.Collections.Generic;
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs b/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
index a55e941..5ccab88 100644
--- a/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;
diff --git a/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs b/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
index 7dc7f4c..6477290 100644
--- a/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
@@ -1,5 +1,6 @@
 using System.Text.Json.Serialization;
 using LibMatrix.Extensions;
+using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
 namespace LibMatrix.StateEventTypes.Spec;