コード例 #1
0
 /// <summary>
 ///     发送好友消息
 /// </summary>
 /// <param name="message"></param>
 /// <param name="user"></param>
 public void SendLongUserMessage(Richtext message, long user)
 {
     foreach (var packet in Send_0X00Cd.SendLongMessage(QQUser, message, user))
     {
         Send(packet.WriteData());
     }
 }
コード例 #2
0
        public void SendToFriend(long friendNumber, Richtext content)
        {
            var message = new Send_0X00Cd(_user, content, friendNumber);

            _socketService.Send(message);
            foreach (var packet in message.Following)
            {
                _socketService.Send(packet);
            }
        }
コード例 #3
0
        public void SendToFriend(long friendNumber, Richtext content)
        {
            var message = new Send_0X00Cd(_user, content, friendNumber);

            _socketService.Send(message);
            foreach (var packet in message.Following)
            {
                _socketService.Send(packet);
            }

            //清除15分钟以上的消息
            _user.FriendSendMessages = _user.FriendSendMessages.Where(c => c.DateTime > DateTime.Now.AddMinutes(QQGlobal.MessagesExpiredMinutes)).ToList();
            _user.FriendSendMessages.Add(message); //添加到消息列表
        }