about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/StateEvent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Core/StateEvent.cs')
-rw-r--r--MatrixRoomUtils.Core/StateEvent.cs53
1 files changed, 53 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Core/StateEvent.cs b/MatrixRoomUtils.Core/StateEvent.cs
new file mode 100644
index 0000000..34cefe4
--- /dev/null
+++ b/MatrixRoomUtils.Core/StateEvent.cs
@@ -0,0 +1,53 @@
+namespace MatrixRoomUtils;
+
+public class StateEvent
+{
+    //example:
+    /*
+       {
+    "content": {
+      "avatar_url": "mxc://matrix.org/BnmEjNvGAkStmAoUiJtEbycT",
+      "displayname": "X ⊂ Shekhinah | she/her | you",
+      "membership": "join"
+    },
+    "origin_server_ts": 1682668449785,
+    "room_id": "!wDPwzxYCNPTkHGHCFT:the-apothecary.club",
+    "sender": "@kokern:matrix.org",
+    "state_key": "@kokern:matrix.org",
+    "type": "m.room.member",
+    "unsigned": {
+      "replaces_state": "$7BWfzN15LN8FFUing1hiUQWFfxnOusrEHYFNiOnNrlM",
+      "prev_content": {
+        "avatar_url": "mxc://matrix.org/hEQbGywixsjpxDrWvUYEFNur",
+        "displayname": "X ⊂ Shekhinah | she/her | you",
+        "membership": "join"
+      },
+      "prev_sender": "@kokern:matrix.org"
+    },
+    "event_id": "$6AGoMCaxqcOeIIDbez1f0VKwLkOEq3EiVLdlsoxDpNg",
+    "user_id": "@kokern:matrix.org",
+    "replaces_state": "$7BWfzN15LN8FFUing1hiUQWFfxnOusrEHYFNiOnNrlM",
+    "prev_content": {
+      "avatar_url": "mxc://matrix.org/hEQbGywixsjpxDrWvUYEFNur",
+      "displayname": "X ⊂ Shekhinah | she/her | you",
+      "membership": "join"
+    }
+  }
+     */
+    public dynamic content { get; set; }
+    public long origin_server_ts { get; set; }
+    public string room_id { get; set; }
+    public string sender { get; set; }
+    public string state_key { get; set; }
+    public string type { get; set; }
+    public dynamic unsigned { get; set; }
+    public string event_id { get; set; }
+    public string user_id { get; set; }
+    public string replaces_state { get; set; }
+    public dynamic prev_content { get; set; }
+}
+
+public class StateEvent<T> : StateEvent where T : class
+{
+    public T content { get; set; }
+}
\ No newline at end of file