public static List<Message> parseMessages(String resultString){
		List<Message> messages = new ArrayList<Message>();
		JSONObject base;
		try {
			base = new JSONObject(resultString);
			int retcode = base.optInt("retcode",-1);
			if (retcode == 0) {
				JSONArray messageArray = base.optJSONArray("result");
				for (int i = 0; i < messageArray.length(); i++) {
					Message message = Message.newEntity(messageArray.optJSONObject(i));
					if (message!=null) {
						messages.add(message);
					}
				}
			}else if (retcode == 100) {
            	//TODO
            }else if (retcode == 120){
            	//TODO
            }else if (retcode == 121){
            	//TODO
            }else if (retcode == 116){
            	Bot.getInstance().setPtwebqq(base.optString("p"));
            }
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		return messages;
	}