class UpdateProfileAction extends RobotAction {

    @Override
    public boolean action(Request request, Response response) {<FILL_FUNCTION_BODY>}
}

        if (request.getNettyRequest() instanceof FullHttpRequest) {
            IntStringPairPojo input = getRequestBody(request.getNettyRequest(), IntStringPairPojo.class);

            WFCMessage.User.Builder builder = messagesStore.getUserInfo(robot.getUid()).toBuilder();
            boolean modified = false;
            String value = input.getStrValue() == null ? "" : input.getStrValue();
            switch (input.getIntValue()) {
                case Modify_DisplayName:
                    builder.setDisplayName(value);
                    modified = true;
                    break;
                case Modify_Gender:
                    builder.setGender(Integer.parseInt(value));
                    modified = true;
                    break;
                case Modify_Portrait:
                    builder.setPortrait(value);
                    modified = true;
                    break;
                //不允许修改电话号码，如果修改电话号码必须通过admin进行修改
//              case Modify_Mobile:
//                    builder.setMobile(value);
//                    modified = true;
//                    break;
                case Modify_Email:
                    builder.setEmail(value);
                    modified = true;
                    break;
                case Modify_Address:
                    builder.setAddress(value);
                    modified = true;
                    break;
                case Modify_Company:
                    builder.setCompany(value);
                    modified = true;
                    break;
                case Modify_Social:
                    builder.setSocial(value);
                    modified = true;
                    break;
                case Modify_Extra:
                    builder.setExtra(value);
                    modified = true;
                    break;
                default:
                    break;
            }

            RestResult result = RestResult.ok();
            if(modified) {
                try {
                    messagesStore.updateUserInfo(builder.build());
                } catch (Exception e) {
                    e.printStackTrace();
                    result.setErrorCode(ErrorCode.ERROR_CODE_SERVER_ERROR);
                }
            }
            setResponseContent(result, response);
        }
        return true;
    
<methods>public non-sealed void <init>() ,public cn.wildfirechat.common.ErrorCode preAction(com.xiaoleilu.loServer.handler.Request, com.xiaoleilu.loServer.handler.Response) <variables>protected static final Logger LOG,protected cn.wildfirechat.proto.WFCMessage.Robot robot