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