添加踢用户下线api接口

This commit is contained in:
imhao183
2021-01-22 10:23:33 +08:00
parent 2c9e8d66e8
commit 5f7df37664
6 changed files with 130 additions and 0 deletions
@@ -63,6 +63,15 @@ public class UserAdmin {
return AdminHttpUtils.httpJsonPost(path, getUserInfo, OutputCheckUserOnline.class);
}
/* 强迫用户下线,需要用户重新获取token才能进行连接。
userId必须有效,clientId可以为空,当为空时,踢下线说有客户端,当不为空时仅踢掉对应客户端。
*/
public static IMResult<Void> kickoffUserClient(String userId, String clientId) throws Exception {
String path = APIPath.User_Kickoff_Client;
StringPairPojo pojo = new StringPairPojo(userId, clientId);
return AdminHttpUtils.httpJsonPost(path, pojo, Void.class);
}
public static IMResult<Void> destroyUser(String userId) throws Exception {
String path = APIPath.Destroy_User;
InputDestroyUser inputDestroyUser = new InputDestroyUser();