Skip to content

Commit 689b3ec

Browse files
committed
(#411) posts: udpate post created command handler
1 parent baa9d5d commit 689b3ec

File tree

1 file changed

+10
-2
lines changed
  • MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers

1 file changed

+10
-2
lines changed

MiniSpace.Services.Posts/src/MiniSpace.Services.Posts.Application/Commands/Handlers/CreatePostHandler.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,16 @@ public async Task HandleAsync(CreatePost command, CancellationToken cancellation
114114
throw new InvalidPostContextException(command.Context.ToString());
115115
}
116116

117-
await _messageBroker.PublishAsync(new PostCreated(command.PostId, post.MediaFiles));
117+
await _messageBroker.PublishAsync(new PostCreated(
118+
command.PostId,
119+
command.UserId,
120+
command.OrganizationId,
121+
command.EventId,
122+
command.TextContent,
123+
command.MediaFiles,
124+
command.Context.ToString(),
125+
command.Visibility
126+
));
118127
}
119-
120128
}
121129
}

0 commit comments

Comments
 (0)