about summary refs log tree commit diff
path: root/LibMatrix.Federation/FederationTypes/FederationEvent.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-01-11 16:16:21 +0100
committerRory& <root@rory.gay>2026-01-11 16:16:21 +0100
commit0640eba992f95cc45873330b76fadf123202d1cd (patch)
treee0193c6fca4b232f936cda9275bb2c11ef4bb790 /LibMatrix.Federation/FederationTypes/FederationEvent.cs
parentUpdate policy server support (diff)
downloadLibMatrix-master.tar.xz
More federation work HEAD master
Diffstat (limited to '')
-rw-r--r--LibMatrix.Federation/FederationTypes/FederationEvent.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/LibMatrix.Federation/FederationTypes/FederationEvent.cs b/LibMatrix.Federation/FederationTypes/FederationEvent.cs
new file mode 100644

index 0000000..05bdcc9 --- /dev/null +++ b/LibMatrix.Federation/FederationTypes/FederationEvent.cs
@@ -0,0 +1,30 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.Federation.FederationTypes; + +public class FederationEvent : MatrixEventResponse { + [JsonPropertyName("auth_events")] + public required List<string> AuthEvents { get; set; } = []; + + [JsonPropertyName("prev_events")] + public required List<string> PrevEvents { get; set; } = []; + + [JsonPropertyName("depth")] + public required int Depth { get; set; } +} + +public class SignedFederationEvent : FederationEvent { + [JsonPropertyName("signatures")] + public required Dictionary<string, Dictionary<string, string>> Signatures { get; set; } = new(); + + [JsonPropertyName("hashes")] + public required Dictionary<string, string> Hashes { get; set; } = new(); +} + +public class FederationEphemeralEvent { + [JsonPropertyName("edu_type")] + public required string Type { get; set; } + + [JsonPropertyName("content")] + public required Dictionary<string, object> Content { get; set; } = new(); +} \ No newline at end of file