添加检查是否订阅频道server api

This commit is contained in:
heavyrian2012
2022-08-26 15:16:48 +08:00
parent 9fa33159c8
commit 650ffa14e2
4 changed files with 81 additions and 1 deletions
@@ -45,7 +45,13 @@ public class GeneralAdmin {
return AdminHttpUtils.httpJsonPost(path, input, Void.class);
}
public static IMResult<Void> unsubscribeChannel(String channelId, String userId) throws Exception {
public static IMResult<OutputBooleanValue> unsubscribeChannel(String channelId, String userId) throws Exception {
String path = APIPath.Check_User_Subscribe_Channel;
InputSubscribeChannel input = new InputSubscribeChannel(channelId, userId, 0);
return AdminHttpUtils.httpJsonPost(path, input, OutputBooleanValue.class);
}
public static IMResult<Void> isUserSubscribedChannel(String userId, String channelId) throws Exception {
String path = APIPath.Subscribe_Channel;
InputSubscribeChannel input = new InputSubscribeChannel(channelId, userId, 0);
return AdminHttpUtils.httpJsonPost(path, input, Void.class);