Пример #1
0
 public virtual ChatMessageInfo BuildParticipantTypeChangedMessage(IChatParticipantTypeChangedEvent <ChatParticipant> @event)
 {
     return(new ChatMessageInfo(MessageType.ChatRef, 0, style: MessageStyle("ParticipantTypeChanged"), contacts: new List <ContactMessage>()
     {
         new ContactMessage(@event.Participant)
     }));
 }
 public virtual IChatParticipantTypeChangedNotification <ChatParticipant> BuildChatParticipantTypeChangedNotification(IChatParticipantTypeChangedEvent <ChatParticipant> @event)
 {
     return(new ChatParticipantTypeChangedNotification(@event.InitiatorUserId, @event.ChatId, @event.Participant));
 }
Пример #3
0
        public virtual async Task Handle(IChatParticipantTypeChangedEvent <TChatParticipant> @event, IChatBusContext chatBusContext)
        {
            var notification = ChatParticipantsNotificationBuilder.BuildChatParticipantTypeChangedNotification(@event);

            await Notify(@event.ChatId, notification);
        }