public async Task AddFeedNotificationTransportIfNeededAsync(string userId) { if (await notificationsRepo.FindUsersNotificationTransportAsync <FeedNotificationTransport>(userId, includeDisabled: true) != null) { return; } await notificationsRepo.AddNotificationTransportAsync(new FeedNotificationTransport { UserId = userId, IsEnabled = true, }); }
public async Task AddFeedNotificationTransportIfNeededAsync(string userId) { if (await notificationsRepo.FindUsersNotificationTransportAsync <FeedNotificationTransport>(userId, includeDisabled: true) != null) { return; } log.Info($"Create feed notification transport for user {userId} because there is no actual one"); await notificationsRepo.AddNotificationTransportAsync(new FeedNotificationTransport { UserId = userId, IsEnabled = true, }); }