using IM_API.Domain.Events; using IM_API.Interface.Services; using MassTransit; namespace IM_API.Application.EventHandlers.GroupJoinHandler { public class GroupJoinConversationHandler : IConsumer { private IConversationService _conversationService; public GroupJoinConversationHandler(IConversationService conversationService) { _conversationService = conversationService; } public async Task Consume(ConsumeContext context) { var @event = context.Message; await _conversationService.MakeConversationAsync(@event.UserId, @event.GroupId, Models.ChatType.GROUP); } } }