Skip to content

Commit

Permalink
(#411) posts: udpate post created event to add shoudl notify flag
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Sep 16, 2024
1 parent 689b3ec commit a4134c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ await _messageBroker.PublishAsync(new PostCreated(
command.EventId,
command.TextContent,
command.MediaFiles,
command.Context.ToString(),
command.Visibility
command.Context.ToString(),
command.Visibility,
shouldNotify: true
));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ namespace MiniSpace.Services.Posts.Application.Events
public class PostCreated : IEvent
{
public Guid PostId { get; }
public Guid? UserId { get; }
public Guid? OrganizationId { get; }
public Guid? EventId { get; }
public string TextContent { get; }
public IEnumerable<string> MediaFilesUrls { get; }
public string Context { get; }
public string Visibility { get; }
public Guid? UserId { get; }
public Guid? OrganizationId { get; }
public Guid? EventId { get; }
public string TextContent { get; }
public IEnumerable<string> MediaFilesUrls { get; }
public string Context { get; }
public string Visibility { get; }
public bool ShouldNotify { get; }

public PostCreated(Guid postId, Guid? userId, Guid? organizationId, Guid? eventId, string textContent,
IEnumerable<string> mediaFilesUrls, string context, string visibility)
IEnumerable<string> mediaFilesUrls, string context, string visibility, bool shouldNotify)
{
PostId = postId;
UserId = userId;
Expand All @@ -26,6 +27,7 @@ public PostCreated(Guid postId, Guid? userId, Guid? organizationId, Guid? eventI
MediaFilesUrls = mediaFilesUrls;
Context = context;
Visibility = visibility;
ShouldNotify = shouldNotify;
}
}
}

0 comments on commit a4134c1

Please sign in to comment.