             }
         }
 
-
-
-        return data
+        return messagesCount
     }
 
     let resource = authJsonResource(path: "/api/v1/official_messages", method: .GET, requestParameters: [:], parse: parse)

                                // 纪录消息的 detail 信息

                                recordMessageWithMessageID(messageID, detailInfo: messageInfo, inRealm: realm)
                            }
                        }
                    }


// MARK: - Messages

func officialMessages(#completion: Int -> Void) {

    let parse: JSONDictionary -> Int? = { data in

        var messagesCount: Int = 0

        if let senderInfo = data["sender"] as? JSONDictionary, senderID = senderInfo["id"] as? String {

