private async Task UpdateAsync(WebPushJob job, ProcessStatus status, string?reason = null) { // We only track the initial publication. if (!job.IsUpdate) { await userNotificationStore.CollectAndUpdateAsync(job, Name, job.Subscription.Endpoint, status, reason); } }
private async Task UpdateAsync(WebhookJob job, ProcessStatus status, string?reason = null) { // We only track the initial publication. if (!job.IsUpdate) { await userNotificationStore.CollectAndUpdateAsync(job.Notification, Name, job.WebhookId, status, reason); } }
public async Task SendAsync(UserNotification notification, ChannelSetting settings, string configuration, SendOptions options, CancellationToken ct) { using (Telemetry.Activities.StartActivity("WebChannel/SendAsync")) { try { await streamClient.SendAsync(notification); await userNotificationStore.CollectAndUpdateAsync(notification, Name, configuration, ProcessStatus.Handled, ct : ct); } catch (Exception ex) { await userNotificationStore.CollectAndUpdateAsync(notification, Name, configuration, ProcessStatus.Failed, ct : ct); log.LogError(ex, "Failed to send web message."); } } }
private Task UpdateAsync(UserNotification notification, ProcessStatus status, string?reason = null) { return(userNotificationStore.CollectAndUpdateAsync(notification, Name, status, reason)); }