Skip to content

Commit

Permalink
(#411) comments: update dd like command handler
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Sep 15, 2024
1 parent 47469f9 commit 2a66e93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ await _messageBroker.PublishAsync(new LikeAdded(
commentId: command.CommentId,
userId: command.UserId,
commentContext: command.CommentContext,
likedAt: DateTime.UtcNow
likedAt: DateTime.UtcNow,
userName: $"{user.FirstName} {user.LastName}",
profileImageUrl: user.ProfileImageUrl
));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ public class LikeAdded : IEvent
public Guid UserId { get; }
public string CommentContext { get; }
public DateTime LikedAt { get; }
public string UserName { get; }
public string ProfileImageUrl { get; }

public LikeAdded(Guid commentId, Guid userId, string commentContext, DateTime likedAt)
public LikeAdded(Guid commentId, Guid userId, string commentContext, DateTime likedAt, string userName, string profileImageUrl)
{
CommentId = commentId;
UserId = userId;
CommentContext = commentContext;
LikedAt = likedAt;
UserName = userName;
ProfileImageUrl = profileImageUrl;
}
}
}

0 comments on commit 2a66e93

Please sign in to comment.