igniterealtime / openfire-restAPI-plugin

Allows Openfire administration over a RESTful API.
http://www.igniterealtime.org/projects/openfire/plugin-archive.jsp?plugin=restAPI
Apache License 2.0
19 stars 53 forks source link

fixes #159: Ensure that a JID can be affiliated only once #161

Closed guusdk closed 2 years ago

guusdk commented 2 years ago

Issues pop up when an attempt is ade to affiliate a JID more than once, especially when that JID is also an owner. Affiliating such a JID as something else will remove the ownership affiliation. This can trigger an issue where the room has no owners.

This commit introduces a check to verify that the inbound request does not define multiple affiliations for the same JID. It also reworks the way in which affiliations are applied.