Ejemplo n.º 1
0
 public virtual ChatMessageInfo BuildChatParticipantInvitedMessage(IChatParticipantInvitedEvent <ChatParticipant> @event)
 {
     return(new ChatMessageInfo(MessageType.ChatRef, 0, style: MessageStyle("ParticipantInvited"), contacts: new List <ContactMessage>()
     {
         new ContactMessage(@event.Participant)
     }));
 }
Ejemplo n.º 2
0
        public virtual async Task Handle(IChatParticipantInvitedEvent <TChatParticipant> @event, IChatBusContext chatBusContext)
        {
            if (ChatWorkersConfiguration.DisableSystemMessages)
            {
                return;
            }
            var messageInfo = SystemMessagesBuilder.BuildChatParticipantInvitedMessage(@event);

            await AddMessage(@event, messageInfo, chatBusContext);
        }
 public virtual IChatParticipantInvitedNotification <ChatParticipant> BuildChatParticipantInvitedNotification(IChatParticipantInvitedEvent <ChatParticipant> @event)
 {
     return(new ChatParticipantInvitedNotification(@event.InitiatorUserId, @event.ChatId, @event.Participant));
 }
Ejemplo n.º 4
0
        public virtual async Task Handle(IChatParticipantInvitedEvent <TChatParticipant> @event, IChatBusContext chatBusContext)
        {
            var notification = ChatParticipantsNotificationBuilder.BuildChatParticipantInvitedNotification(@event);

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