class CreateChannelHandler extends GroupHandler<WFCMessage.ChannelInfo> {
    @Override
    public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, ProtoConstants.RequestSourceType requestSourceType, WFCMessage.ChannelInfo request, Qos1PublishHandler.IMCallback callback) {<FILL_FUNCTION_BODY>}
}

        WFCMessage.ChannelInfo.Builder builder = request.toBuilder();
        if (StringUtil.isNullOrEmpty(request.getTargetId())) {
            builder.setTargetId(m_messagesStore.getShortUUID());
        }
        if (StringUtil.isNullOrEmpty(request.getOwner())) {
            builder.setOwner(fromUser);
        }
        if (StringUtil.isNullOrEmpty(request.getSecret())) {
            builder.setSecret(m_messagesStore.getShortUUID());
        }

        long update = System.currentTimeMillis();
        request = builder.setUpdateDt(update).build();

        ErrorCode errorCode = m_messagesStore.createChannel(fromUser, request);

        if (errorCode == ErrorCode.ERROR_CODE_SUCCESS) {
            WFCMessage.ModifyUserSettingReq modifyUserSettingReq = WFCMessage.ModifyUserSettingReq.newBuilder().setScope(kUserSettingMyChannels).setKey(request.getTargetId()).setValue("1").build();
            mServer.onApiMessage(fromUser, null, modifyUserSettingReq.toByteArray(), 0, fromUser, PutUserSettingTopic, requestSourceType);
            byte[] data = request.getTargetId().getBytes();
            ackPayload.ensureWritable(data.length).writeBytes(data);
            return ErrorCode.ERROR_CODE_SUCCESS;
        } else {
            return errorCode;
        }
    
<methods>public non-sealed void <init>() <variables>