diff --git a/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers/CreatePostHandler.cs b/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers/CreatePostHandler.cs index b9a7af8af..86cbafbf2 100644 --- a/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers/CreatePostHandler.cs +++ b/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers/CreatePostHandler.cs @@ -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 )); } } diff --git a/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Events/PostCreated.cs b/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Events/PostCreated.cs index 641b149b8..f5444aeb1 100644 --- a/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Events/PostCreated.cs +++ b/MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Events/PostCreated.cs @@ -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 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 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 mediaFilesUrls, string context, string visibility) + IEnumerable mediaFilesUrls, string context, string visibility, bool shouldNotify) { PostId = postId; UserId = userId; @@ -26,6 +27,7 @@ public PostCreated(Guid postId, Guid? userId, Guid? organizationId, Guid? eventI MediaFilesUrls = mediaFilesUrls; Context = context; Visibility = visibility; + ShouldNotify = shouldNotify; } } }