Example #1
0
 public virtual ChatMessageInfo BuildChatParticipantAppliedMessage(IChatParticipantAppliedEvent <ChatParticipant> @event)
 {
     return(new ChatMessageInfo(MessageType.ChatRef, 0, style: MessageStyle("ParticipantApplied"), contacts: new List <ContactMessage>()
     {
         new ContactMessage(@event.Participant)
     }));
 }
Example #2
0
        public virtual async Task Handle(IChatParticipantAppliedEvent <TChatParticipant> @event, IChatBusContext chatBusContext)
        {
            if (ChatWorkersConfiguration.DisableSystemMessages)
            {
                return;
            }
            var messageInfo = SystemMessagesBuilder.BuildChatParticipantAppliedMessage(@event);

            await AddMessage(@event, messageInfo, chatBusContext);
        }
 public virtual IChatParticipantAppliedNotification <ChatParticipant> BuildChatParticipantAppliedNotification(IChatParticipantAppliedEvent <ChatParticipant> @event)
 {
     return(new ChatParticipantAppliedNotification(@event.InitiatorUserId, @event.ChatId, @event.Participant));
 }
Example #4
0
        public virtual async Task Handle(IChatParticipantAppliedEvent <TChatParticipant> @event, IChatBusContext chatBusContext)
        {
            var notification = ChatParticipantsNotificationBuilder.BuildChatParticipantAppliedNotification(@event);

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