about summary refs log tree commit diff
path: root/LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.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/FederationGetMissingEventsRequest.cs
parentUpdate policy server support (diff)
downloadLibMatrix-master.tar.xz
More federation work HEAD master
Diffstat (limited to '')
-rw-r--r--LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.cs b/LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.cs
new file mode 100644

index 0000000..f43dd49 --- /dev/null +++ b/LibMatrix.Federation/FederationTypes/FederationGetMissingEventsRequest.cs
@@ -0,0 +1,34 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.Federation.FederationTypes; + +public class FederationGetMissingEventsRequest { + /// <summary> + /// Latest event IDs we already have (aka earliest to return) + /// </summary> + [JsonPropertyName("earliest_events")] + public required List<string> EarliestEvents { get; set; } + + /// <summary> + /// Events we want to get events before + /// </summary> + [JsonPropertyName("latest_events")] + public required List<string> LatestEvents { get; set; } + + /// <summary> + /// 10 by default + /// </summary> + [JsonPropertyName("limit")] + public int Limit { get; set; } + + /// <summary> + /// 0 by default + /// </summary> + [JsonPropertyName("min_depth")] + public long MinDepth { get; set; } +} + +public class FederationGetMissingEventsResponse { + [JsonPropertyName("events")] + public required List<SignedFederationEvent> Events { get; set; } +} \ No newline at end of file