Exemplo n.º 1
0
        public static HistoryMessageInfo ParserReceiveToConversation(RcReceiveMsg info)
        {
            var data = new HistoryMessageInfo()
            {
                SenderId = info.m_SenderId,
                TargetId = info.m_TargetId,
                SendTime = info.m_SendTime,
                SenderAvatar = SystemConfig.AvatarUrl + info.m_SenderId,
                Content = ConversationContentParser(RcHelper.ParseMessageType(info.m_ClazzName), info.m_Message),
                IsMe = info.m_SenderId == UserContext.Current.Id,
                SenderName = _bussinessService.GetName(info.m_SenderId),
                Type = RcHelper.ParseMessageType(info.m_ClazzName)
            };

            return data;
        }
Exemplo n.º 2
0
 public static ConversationMessageInfo ParserConversation(RcReceiveMsg info)
 {
     var data = new ConversationMessageInfo()
     {
         TargetId = info.m_TargetId,
         ConversationType = info.m_ConversationType,
         UnreadCount = 1,
         SenderId = info.m_SenderId,
         SendTime = info.m_SendTime,
         Type = RcHelper.ParseMessageType(info.m_ClazzName),
         TargertName = info.m_ConversationType == ConversationType.PRIVATE ? _bussinessService.GetName(info.m_TargetId) : "群组",
         Content = ConversationContentParser(RcHelper.ParseMessageType(info.m_ClazzName), info.m_Message),
         AvatarIcon = SystemConfig.AvatarUrl + info.m_TargetId
     };
     return data;
 }