Open Fishbowler opened 1 year ago
Initial state:
curl -s -k -H "Accept: application/json" -X GET \ -u "myuser:mypassword" \ https://myopenfire/plugins/restapi/v1/chatrooms/test1?servicename=mucservice \ | jq . \ | grep "canAnyoneDiscoverJID" "canAnyoneDiscoverJID": true,
Then:
curl -X 'PUT' \ -u "myuser:mypassword" \ https://myopenfire/plugins/restapi/v1/chatrooms/test1?servicename=mucservice \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d '{"roomName": "test1", "description": "test1 Desc Updated"}'
Alters state so that:
curl -s -k -H "Accept: application/json" -X GET \ -u "myuser:mypassword" \ https://myopenfire/plugins/restapi/v1/chatrooms/test1?servicename=mucservice \ | jq . \ | grep "canAnyoneDiscoverJID" "canAnyoneDiscoverJID": false,
Suspected caused by this: https://github.com/igniterealtime/openfire-restAPI-plugin/blob/a990316a9a5506fe9b4407274c2a357adc954e1a/src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java#L385
Which calls this: https://github.com/igniterealtime/openfire-restAPI-plugin/blob/a990316a9a5506fe9b4407274c2a357adc954e1a/src/java/org/jivesoftware/openfire/plugin/rest/entity/MUCRoomEntity.java#L186
Because that is a primitive boolean, the default is false - so if a client does not send a value, the value defaults to false, and overwrites, regardless of the existing value. If so, move to using Boolean?
If so, move to using Boolean?
Agreed.
Initial state:
Then:
Alters state so that:
Suspected caused by this: https://github.com/igniterealtime/openfire-restAPI-plugin/blob/a990316a9a5506fe9b4407274c2a357adc954e1a/src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java#L385
Which calls this: https://github.com/igniterealtime/openfire-restAPI-plugin/blob/a990316a9a5506fe9b4407274c2a357adc954e1a/src/java/org/jivesoftware/openfire/plugin/rest/entity/MUCRoomEntity.java#L186
Because that is a primitive boolean, the default is false - so if a client does not send a value, the value defaults to false, and overwrites, regardless of the existing value. If so, move to using Boolean?