Ejemplo n.º 1
0
        private async Task Notify(Notification notification, ApplicationUser sender, Topic topic, Comment comment = null)
        {
            try
            {
                await Do(async() => await _context.Notifications.AddAsync(notification));

                _notificationsHub.Notify(notification.ReceiverId, NotificationDto.Create(notification, sender, topic, comment));
            }
            catch
            {
                // ignored
            }
        }