Table of Contents

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

user UserId

The user whose notification is changed, which is what scopes the write.

notification NotificationId

The notification to change.

isRead bool

The read state it is to stand in.

cancellationToken CancellationToken

Cancels 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.