/// <summary> /// Notify a user that one of the users vlogs received /// a new like. /// </summary> /// <remarks> /// This is dispatched to the <see cref="DispatchManager"/>. /// </remarks> /// <param name="receivingUserId">User that received the vlog like.</param> /// <param name="vlogLikeId">The vlog like id.</param> public virtual Task NotifyVlogLikedAsync(Guid receivingUserId, VlogLikeId vlogLikeId) { if (vlogLikeId is null) { throw new ArgumentNullException(nameof(vlogLikeId)); } var notificationContext = _notificationFactory.BuildVlogGainedLike(receivingUserId, vlogLikeId.VlogId, vlogLikeId.UserId); _logger.LogTrace($"Notifying user {receivingUserId} that {vlogLikeId.VlogId} gained a like"); _dispatchManager.Dispatch <NotifyBackgroundTask <DataVlogGainedLike> >(notificationContext); return(Task.CompletedTask); }