'ïŒ1ïŒæ¥èªå¥œåçæ¶æ¯
ïŒ2ïŒæ¥èªçŸ€çæ¶æ¯
ïŒ1ïŒæå­ïŒ2ïŒåŸçïŒ3ïŒè¯­é³ïŒ4ïŒè§é¢ïŒ5ïŒå°åïŒ6ïŒåçïŒ7ïŒæéïŒ8ïŒåäº«ïŒ9ïŒéä»¶'

def __init__(self, msg):

    if ((time.time() - my.update_time) > 600):
        update_my_infos()
        my.update_time = time.time()
    self.msg_id = msg['MsgId']
    self.from_user_name = msg['FromUserName']
    self.msg_type = msg['MsgType']
    self.msg_content = msg['Content']
    self.msg_time = msg['CreateTime']
    self.msg_file = msg['FileName']
    self.msg_file_length = msg['FileSize']
    self.msg_voice_length = msg['VoiceLength']
    self.msg_play_length = msg['PlayLength']
    self.msg_url = msg['Url']
    self.user_user_name = msg['User'].get('UserName', '')
    self.user_nick_name = msg['User'].get('NickName', '')
    self.user_remark_name = msg['User'].get('RemarkName', '')
    self.wind_name = (self.user_remark_name if self.user_remark_name else (self.user_nick_name if self.user_nick_name else (my.friends[self.user_user_name]['NickName'] if (self.user_user_name in my.friends) else (my.groups[self.user_user_name]['NickName'] if (self.user_user_name in my.groups) else '\xe6\x9c\xaa\xe7\x9f\xa5\xe7\xaa\x97\xe5\x8f\xa3'))))
    self.actual_user_name = msg.get('ActualUserName', '')
    self.actual_nick_name = msg.get('ActualNickName', '')
    self.actual_remark_name = (self.actual_nick_name if ((self.actual_user_name not in my.friends) or (not my.friends[self.actual_user_name]['RemarkName'])) else my.friends[self.actual_user_name]['RemarkName'])
    self.is_at = msg.get('IsAt', None)
    self.we_type = msg['Type']
    self.we_text = msg['Text']
    logging.warning('wind_name=%s,    send_name=%s,    we_type=%s,    we_text=%s', self.wind_name, self.actual_remark_name, self.we_type, self.we_text)
    return
