revert对api参数的修改,需要保持SDK的兼容
This commit is contained in:
+2
-2
@@ -33,7 +33,7 @@ public class SubscriberChannelAction extends ChannelAction {
|
||||
public boolean action(Request request) {
|
||||
if (request.getNettyRequest() instanceof FullHttpRequest) {
|
||||
InputChannelSubscribe input = getRequestBody(request.getNettyRequest(), InputChannelSubscribe.class);
|
||||
if (input != null && !StringUtil.isNullOrEmpty(input.getUserId())) {
|
||||
if (input != null && !StringUtil.isNullOrEmpty(input.getTarget())) {
|
||||
if(input.getSubscribe() > 0 && (channelInfo.getStatus() & ProtoConstants.ChannelState.Channel_State_Mask_Active_Subscribe) == 0) {
|
||||
response.setStatus(HttpResponseStatus.OK);
|
||||
RestResult result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_RIGHT);
|
||||
@@ -41,7 +41,7 @@ public class SubscriberChannelAction extends ChannelAction {
|
||||
return true;
|
||||
}
|
||||
WFCMessage.ListenChannel listenChannel = WFCMessage.ListenChannel.newBuilder().setChannelId(channelInfo.getTargetId()).setListen(input.getSubscribe()).build();
|
||||
sendApiMessage(input.getUserId(), IMTopic.ChannelListenTopic, listenChannel.toByteArray(), result -> {
|
||||
sendApiMessage(input.getTarget(), IMTopic.ChannelListenTopic, listenChannel.toByteArray(), result -> {
|
||||
ByteBuf byteBuf = Unpooled.buffer();
|
||||
byteBuf.writeBytes(result);
|
||||
ErrorCode errorCode = ErrorCode.fromCode(byteBuf.readByte());
|
||||
|
||||
Reference in New Issue
Block a user