internal void AddMessageToRecipients(INotificationEvent notification, MarketDbContext context) { foreach (Guid userID in notification.getRecipientsIDs()) { if (TryGetRegistered(userID, out RegisteredUser registered, context)) { registered.AddNotificationMessage(notification.GetMessage()); }
public void NotifyEvent(INotificationEvent notification, MarketDbContext context) { userManager.AddMessageToRecipients(notification, context); if (communicationNotificationAlerter != null) { foreach (Guid userID in notification.getRecipientsIDs()) { this.communicationNotificationAlerter.AlertUser(userID); } } }