添加修改频道菜单接口
This commit is contained in:
@@ -2,8 +2,10 @@ package cn.wildfirechat.sdk;
|
|||||||
|
|
||||||
import cn.wildfirechat.common.APIPath;
|
import cn.wildfirechat.common.APIPath;
|
||||||
import cn.wildfirechat.pojos.*;
|
import cn.wildfirechat.pojos.*;
|
||||||
|
import cn.wildfirechat.proto.ProtoConstants;
|
||||||
import cn.wildfirechat.sdk.model.IMResult;
|
import cn.wildfirechat.sdk.model.IMResult;
|
||||||
import cn.wildfirechat.sdk.utilities.ChannelHttpUtils;
|
import cn.wildfirechat.sdk.utilities.ChannelHttpUtils;
|
||||||
|
import com.google.gson.Gson;
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -49,6 +51,11 @@ public class ChannelServiceApi {
|
|||||||
return channelHttpUtils.httpJsonPost(path, null, OutputGetChannelInfo.class);
|
return channelHttpUtils.httpJsonPost(path, null, OutputGetChannelInfo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IMResult<Void> modifyChannelMenu(List<OutputGetChannelInfo.OutputMenu> menus) throws Exception {
|
||||||
|
String menuStr = new Gson().toJson(menus);
|
||||||
|
return modifyChannelInfo(ProtoConstants.ModifyChannelInfoType.Modify_Channel_Menu, menuStr);
|
||||||
|
}
|
||||||
|
|
||||||
public IMResult<SendMessageResult> sendMessage(int line, List<String> targets, MessagePayload payload) throws Exception {
|
public IMResult<SendMessageResult> sendMessage(int line, List<String> targets, MessagePayload payload) throws Exception {
|
||||||
String path = APIPath.Channel_Message_Send;
|
String path = APIPath.Channel_Message_Send;
|
||||||
SendChannelMessageData messageData = new SendChannelMessageData();
|
SendChannelMessageData messageData = new SendChannelMessageData();
|
||||||
|
|||||||
Reference in New Issue
Block a user