From 74bc1111a06a84e67f53c457ff4a03393a9fb341 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 1 Apr 2025 12:43:36 +0200 Subject: Followup documentation from chat, fix trailing whitespace Context: https://matrix.to/#/%21tuiLEoMqNOQezxILzt%3Arory.gay/%24cKr08d3ph5CvY3kZS4Wy6GtSoMXBOUk-jDMvM4tHwNs?via=rory.gay&via=matrix.org&via=conduit.rory.gay --- LibMatrix/RoomTypes/GenericRoom.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'LibMatrix/RoomTypes/GenericRoom.cs') diff --git a/LibMatrix/RoomTypes/GenericRoom.cs b/LibMatrix/RoomTypes/GenericRoom.cs index f8a3ff8..93736a3 100644 --- a/LibMatrix/RoomTypes/GenericRoom.cs +++ b/LibMatrix/RoomTypes/GenericRoom.cs @@ -477,12 +477,21 @@ public class GenericRoom { /// /// Updates the marker for the given receipt type to the event ID specified. /// + /// The event ID to acknowledge up to. + /// + /// The root thread event’s ID (or main) for which thread this receipt is intended to be under. + /// If not specified, the read receipt is unthreaded (default). + /// + /// + /// If set to true, a receipt type of m.read.private is sent instead of m.read, which marks the + /// room as "read" only for the current user + /// public async Task SendReadReceiptAsync(string eventId, string? threadId = null, bool isPrivate = false) { var request = new JsonObject(); if (threadId != null) request.Add("thread_id", threadId); await Homeserver.ClientHttpClient.PostAsJsonAsync( - $"/_matrix/client/v3/rooms/{RoomId}/receipt/m.read{(isPrivate ? ".private" : "")}/{eventId}", request, + $"/_matrix/client/v3/rooms/{RoomId}/receipt/m.read{(isPrivate ? ".private" : "")}/{eventId}", request, new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }); @@ -577,4 +586,4 @@ public class GenericRoom { public class RoomIdResponse { [JsonPropertyName("room_id")] public string RoomId { get; set; } -} \ No newline at end of file +} -- cgit 1.5.1