about summary refs log tree commit diff
path: root/LibMatrix/RoomTypes/GenericRoom.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-04-01 12:43:36 +0200
committerRory& <root@rory.gay>2025-04-01 12:43:36 +0200
commit74bc1111a06a84e67f53c457ff4a03393a9fb341 (patch)
treeedeb279e8f781228b334ee3c11575adb1dc430f6 /LibMatrix/RoomTypes/GenericRoom.cs
parentAdd methods for typing notifications and read receipts (diff)
downloadLibMatrix-74bc1111a06a84e67f53c457ff4a03393a9fb341.tar.xz
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
Diffstat (limited to 'LibMatrix/RoomTypes/GenericRoom.cs')
-rw-r--r--LibMatrix/RoomTypes/GenericRoom.cs13
1 files changed, 11 insertions, 2 deletions
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 { /// <summary> /// Updates the marker for the given receipt type to the event ID specified. /// </summary> + /// <param name="eventId">The event ID to acknowledge up to.</param> + /// <param name="threadId"> + /// 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). + /// </param> + /// <param name="isPrivate"> + /// 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 + /// </param> 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 +}