Exemplo n.º 1
0
 private void UserClient_OnClearMessageReceived(object sender, ChatClearMessagePacketModel packet)
 {
     if (packet != null && !string.IsNullOrEmpty(packet.ID) && !string.IsNullOrEmpty(packet.UserLogin))
     {
         UserViewModel user = ChannelSession.Services.User.GetActiveUserByUsername(packet.UserLogin, StreamingPlatformTypeEnum.Twitch);
         if (user == null)
         {
             user = UserViewModel.Create(packet.UserLogin);
         }
         this.OnMessageDeletedOccurred(this, new TwitchChatMessageViewModel(packet, user));
     }
 }
Exemplo n.º 2
0
 public TwitchChatMessageViewModel(ChatClearMessagePacketModel messageDeletion, UserViewModel user)
     : base(messageDeletion.ID, StreamingPlatformTypeEnum.Twitch, user)
 {
     this.ProcessMessageContents(messageDeletion.Message);
 }