コード例 #1
0
ファイル: FeedRepo.cs プロジェクト: FuryThrue/Ulearn
        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,
            });
        }
コード例 #2
0
ファイル: FeedRepo.cs プロジェクト: Griboedoff/Ulearn
        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,
            });
        }