using GroupService.Domain.Events; using IM.Commons.IntegrationEvents; using MassTransit; using MediatR; namespace GroupService.WebApi.Application.EventHandler { public class GroupMemberLeftHandler(IPublishEndpoint endpoint) : INotificationHandler { public Task Handle(GroupMemberLeftDomainEvent notification, CancellationToken cancellationToken) { return endpoint.Publish( new GroupMemberLeftEvent(notification.Member.UserId, notification.Member.GroupId), cancellationToken); } } }