public void Report(IReportable reportable, int[] affectedUserIds) { _activityLogService.LogActivity(reportable); var notification = reportable.Compose(_serviceProvider); foreach (int userId in affectedUserIds) { _notificationSenderService.SendNotificationAsync(new CreateUserNotificationDto { isLink = notification.isLink, Link = notification.Link, Message = notification.Message, Subject = notification.Subject, UserId = userId }); } }
public override void Handle(ReviewAddedNotification evt) { var culture = _variationContextAccessor.VariationContext.Culture; var snapshot = _productAdapter.GetProductSnapshot(evt.Review.ProductReference, culture); if (snapshot == null) { return; } _activityLogService.LogActivity(evt.Review.StoreId, evt.Review.Id, Constants.Entities.EntityTypes.Review, "New review added", $"vendrreviews/review-edit/{evt.Review.StoreId}_{evt.Review.Id}", $"Review submitted from {evt.Review.Name} with a rating of {evt.Review.Rating} for product {snapshot.Sku}", evt.Review.CreateDate); }