Method SetReadAsync
- Namespace
- MailFathom.Application.Notifications
- Assembly
- MailFathom.Application.dll
SetReadAsync(UserId, NotificationId, bool, CancellationToken)
Puts one of a user's notifications into a stated read state.
Task<NotificationReadOutcome> SetReadAsync(UserId user, NotificationId notification, bool isRead, CancellationToken cancellationToken)
Parameters
userUserIdThe user whose notification is changed, which is what scopes the write.
notificationNotificationIdThe notification to change.
isReadboolThe read state it is to stand in.
cancellationTokenCancellationTokenCancels the read and the write.
Returns
- Task<NotificationReadOutcome>
What became of the request.
Remarks
The user is part of the addressing rather than a filter applied after a lookup, so a notification another user holds is not found rather than found and refused — which is what keeps the answer identical for one that does not exist at all.