use of org.roof.im.request.UserStateRequest in project roof-im by madfroglx.
the class RequestTest method online.
public void online(String token) throws Exception {
UserStateRequest userStateRequest = new UserStateRequest();
userStateRequest.setClientType(ClientType.h5.name());
userStateRequest.setRequestType("online");
userStateRequest.setToken(token);
ValueStack valueStack = new GenericValueStack();
System.out.println(JSON.toJSONString(userStateRequest));
valueStack.set(ImConstant.TEXT_MESSAGE, JSON.toJSONString(userStateRequest));
valueStack.set(ImConstant.CONNECT_ID, "1");
JSONObject jsonObjectMessage = JSON.parseObject(JSON.toJSONString(userStateRequest));
valueStack.set(ImConstant.JSON_OBJECT_MESSAGE, jsonObjectMessage);
enterChain.doChain(valueStack);
}
Aggregations