mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-18 13:24:59 +00:00
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:
@@ -11,4 +11,9 @@ public interface IMessageReadingService
|
||||
Task<Result<ChatReadResult, Error>> ReadChatAsync(Guid readerId, Guid chatId,
|
||||
RecipientType type, IReadOnlyCollection<Guid>? messageIds = null, Guid? upToMessageId = null);
|
||||
Task<Result<int, Error>> GetUnreadCountAsync(Guid readerId, Guid chatId, RecipientType type);
|
||||
Task<Result<ChatActivity, Error>> GetChatActivityAsync(Guid readerId, Guid chatId, RecipientType type,
|
||||
bool includeReadPosition = false);
|
||||
}
|
||||
|
||||
public sealed record ChatActivity(int UnreadCount, DateTime? LastMessageAt,
|
||||
Guid? LastReadMessageId = null, Guid? FirstUnreadMessageId = null);
|
||||
|
||||
Reference in New Issue
Block a user