           log.error e  if e
           @save_group_info ret.result if ret.retcode == 0
           callback( ret.retcode == 0, e || 'retcode isnot 0' ) if callback
+
+    # 获取好友列表
+    update_buddy_list: (callback)->
+        @api.get_buddy_list @auth , (ret,e)=>
+            @save_buddy_info ret.result if ret.retcode == 0
+            callback( ret.retcode == 0, e || 'retcode isnot 0' ) if callback
     
     # 更新群成员， 似乎获取不到群ID
     # @options {key:value} 

  
    on_message: (@msg_cb)->
    dispatch: (params...)->
        @msg_cb(params...) if @msg_cb



    reply_message: (message, content, callback)->
        log.info "发送消息：",content
        if message.type == 'group'
            @api.send_msg_2group  message.from_gid , content , @auth, (ret,e)->
                callback(ret,e) if callback
        else if message.type == 'buddy'
            @api.send_msg_2buddy message.from_uin , content , @auth , (ret,e)->
                callback(ret,e) if callback
    
    # 发送群消息
    send_message_to_group: (gid, content, callback)->
