about summary refs log tree commit diff
path: root/LibMatrix/StateEventTypes
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/StateEventTypes')
-rw-r--r--LibMatrix/StateEventTypes/Common/MjolnirShortcodeEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Common/RoomEmotesEventData.cs2
-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.cs2
-rw-r--r--LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs2
-rw-r--r--LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs1
-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.cs16
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs1
-rw-r--r--LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs4
-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
22 files changed, 14 insertions, 31 deletions
diff --git a/LibMatrix/StateEventTypes/Common/MjolnirShortcodeEventData.cs b/LibMatrix/StateEventTypes/Common/MjolnirShortcodeEventData.cs
index c3fee34..7a4b3f3 100644
--- a/LibMatrix/StateEventTypes/Common/MjolnirShortcodeEventData.cs
+++ b/LibMatrix/StateEventTypes/Common/MjolnirShortcodeEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Common/RoomEmotesEventData.cs b/LibMatrix/StateEventTypes/Common/RoomEmotesEventData.cs
index 754a9dc..ad65b0f 100644
--- a/LibMatrix/StateEventTypes/Common/RoomEmotesEventData.cs
+++ b/LibMatrix/StateEventTypes/Common/RoomEmotesEventData.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs b/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
index 384ca43..269bd6d 100644
--- a/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/CanonicalAliasEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs b/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
index eadba67..7ba3428 100644
--- a/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/GuestAccessEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs b/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
index 1c73346..deca7c8 100644
--- a/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/HistoryVisibilityEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
index 08e8f22..b64c1dd 100644
--- a/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/JoinRulesEventData.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs b/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
index c0aed9e..2e66bd9 100644
--- a/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/PolicyRuleStateEventData.cs
@@ -1,6 +1,4 @@
-using System;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs b/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
index c5a95ae..5167502 100644
--- a/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/PresenceStateEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
index df80a08..3f2c39e 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomAliasEventData.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
index 4d3fabf..f71e1fb 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomAvatarEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
index 0b1bd5c..31f9411 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomCreateEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
index 126117d..9673dcc 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomEncryptionEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
index 7c181ae..c99aa8d 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomMemberEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
index 11a0e82..d13c273 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomMessageEventData.cs
@@ -1,5 +1,5 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
+using ArcaneLibs.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
@@ -7,8 +7,21 @@ namespace LibMatrix.StateEventTypes.Spec;
 
 [MatrixEvent(EventName = "m.room.message")]
 public class RoomMessageEventData : IStateEventType {
+    public RoomMessageEventData() { }
+
+    public RoomMessageEventData(string messageType, string body) {
+        MessageType = messageType;
+        Body = body;
+    }
+
+    public RoomMessageEventData(string body) : this() {
+        Body = body;
+        MessageType = "m.notice";
+    }
+
     [JsonPropertyName("body")]
     public string Body { get; set; }
+
     [JsonPropertyName("msgtype")]
     public string MessageType { get; set; } = "m.notice";
 
@@ -28,7 +41,6 @@ public class RoomMessageEventData : IStateEventType {
     public string? Url { get; set; }
 
     public class MessageRelatesTo {
-
         [JsonPropertyName("m.in_reply_to")]
         public MessageInReplyTo? InReplyTo { get; set; }
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
index 2245793..e04f0dc 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomNameEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
index 10ef3f5..bb78aeb 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomPinnedEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
index 3c985f6..b4f7d53 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomPowerLevelEventData.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
index eaf9e8c..c3deb98 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomTopicEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs b/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
index cebb238..3812c46 100644
--- a/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/RoomTypingEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs b/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
index a258707..d00b464 100644
--- a/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/ServerACLEventData.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs b/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
index 5ccab88..e8c6d18 100644
--- a/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/SpaceChildEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;
 
diff --git a/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs b/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
index 6477290..ebd083e 100644
--- a/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
+++ b/LibMatrix/StateEventTypes/Spec/SpaceParentEventData.cs
@@ -1,5 +1,4 @@
 using System.Text.Json.Serialization;
-using LibMatrix.Extensions;
 using LibMatrix.Helpers;
 using LibMatrix.Interfaces;