public virtual ChatMessageInfo BuildChatParticipantRemovedMessage(IChatParticipantRemovedEvent <ChatParticipant> @event) { return(new ChatMessageInfo(MessageType.ChatRef, 0, style: MessageStyle("ParticipantInvited"), contacts: new List <ContactMessage>() { new ContactMessage(@event.Participant) })); }
public virtual async Task Handle(IChatParticipantRemovedEvent <TChatParticipant> @event, IChatBusContext chatBusContext) { var notification = ChatParticipantsNotificationBuilder.BuildChatParticipantRemovedNotification(@event); await Notify(@event.ChatId, notification); await NotificationRouteService.RemoveUserFromChat(@event.Participant.UserId, @event.ChatId); }
public virtual async Task Handle(IChatParticipantRemovedEvent <TChatParticipant> @event, IChatBusContext chatBusContext) { if (ChatWorkersConfiguration.DisableSystemMessages) { return; } var messageInfo = SystemMessagesBuilder.BuildChatParticipantRemovedMessage(@event); await AddMessage(@event, messageInfo, chatBusContext); }
public virtual IChatParticipantRemovedNotification <ChatParticipant> BuildChatParticipantRemovedNotification(IChatParticipantRemovedEvent <ChatParticipant> @event) { return(new ChatParticipantRemovedNotification(@event.InitiatorUserId, @event.ChatId, @event.Participant)); }