Add read receipts and editing limits

Introduced message read tracking with a dedicated MessageReadingService, SignalR read request/response contracts, and hub notification flow for read receipts. Added configurable message edit constraints through MessageEditingOptions and a shared INowDateTimeProvider so timestamps are consistent across the app. Also fixed recipient validation in message removal and improved push token upsert behavior by matching the correct user/session record.
This commit is contained in:
Artemy
2026-08-27 18:02:47 +07:00
parent 3ec61fa2c0
commit 4603be9f71
17 changed files with 262 additions and 30 deletions
@@ -45,6 +45,16 @@ public class ChatNotificationService : IChatNotificationService
// .SendAsync(ChatHubConstants.MessageSent, message);
}
public async Task NotifyMessageWasReadAsync(MessageReadResponse response)
{
await NotifyParticipantsAsync(
response.ReaderId,
response.RecipientId,
response.RecipientType,
ChatHubConstants.MessageRead,
response);
}
private async Task NotifyMessageReceivedInPrivateChatAsync(UserMessageResponse message)
{