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:
|
room.setCanAnyoneDiscoverJID(mucRoomEntity.isCanAnyoneDiscoverJID()); |
Which calls this:
|
public boolean isCanAnyoneDiscoverJID() { |
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?
Initial state:
Then:
Alters state so that:
Suspected caused by this:
openfire-restAPI-plugin/src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java
Line 385 in a990316
Which calls this:
openfire-restAPI-plugin/src/java/org/jivesoftware/openfire/plugin/rest/entity/MUCRoomEntity.java
Line 186 in a990316
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?