'''
@Override
public int sendChannelMsg(String channelId, String msgContent) {
try {
MessagePayload payload = new MessagePayload();
payload.setType(1);
payload.setSearchableContent("hello world");
ChannelServiceApi channelServiceApi = new ChannelServiceApi(ImHelper.channelIMUrl, channelId, admin_secret);
IMResult<SendMessageResult> resultSendMessage = channelServiceApi.sendMessage(0, (List) null, payload);
if (resultSendMessage != null && resultSendMessage.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
System.out.println("send message to all the subscriber success");
return 1;
} else {
System.out.println("send message to all the subscriber failure");
return 0;
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
'''