Expose chat read positions and E2EE errors

Add optional chat activity and read-position details to the unread-count endpoint. Return stable E2EE rejection codes for stale timestamps and untrusted signing devices, with tests for both behaviors.
This commit is contained in:
Artemy
2026-11-15 21:26:00 +07:00
parent def724e0ee
commit 31d704712c
9 changed files with 108 additions and 8 deletions
+2
View File
@@ -55,6 +55,8 @@ public static class E2eeProtocol
public const int MaxDevices = 500;
public const string EncryptedMimeType = "application/vnd.govor.encrypted";
public const string DevicesChangedError = "E2EE_DEVICES_CHANGED";
public const string TimestampOutOfRangeError = "E2EE_TIMESTAMP_OUT_OF_RANGE";
public const string SigningDeviceRejectedError = "E2EE_SIGNING_DEVICE_REJECTED";
public static readonly JsonSerializerOptions Json = new() { PropertyNameCaseInsensitive = true };
public static bool IsEncrypted(string? value)