Skip to content

Releases: gidkom/php-openfire-restapi

v1.3.0

11 Apr 19:11

Choose a tag to compare

New endpoints

  • pushRosterEvent($username)POST /users/{username}/roster/push
    Tells Openfire to re-push the roster to a user's connected resources. Useful after bulk roster updates so clients see the changes without reconnecting.

  • clearMessages($username, $targetUsername)DELETE /archive/messages/{username}/{targetUsername}
    Clears the archived message history between two users.
    Requires the Openfire Monitoring Service plugin to be installed alongside the REST API plugin.

Usage

$api->pushRosterEvent('alice');
$api->clearMessages('alice', 'bob');

Credit

Both endpoints were originally proposed by @rburakov in #32. Thanks!

v1.2.0

11 Apr 18:59

Choose a tag to compare

Fixes

  • updateUser (#31): dropped unrecognized groups field and now filters false/null values so Openfire no longer returns 500 on partial updates. Use addToGroup() / deleteFromGroup() for group membership.
  • addToRoster (#29): renamed name parameter to nickname to match Openfire's roster entity and filters false/null values.
  • deleteFromRoster (#30): stopped sending a body on the DELETE request.
  • updateRoster: fixed a broken call that passed 4 args into the 3-arg doRequest signature and sent the wrong payload keys.
  • userRosters: removed compact() over undefined variables that triggered PHP 7.3+ warnings.

Packaging

  • composer.json (#34): removed the hardcoded "version": "1.0.0" field. Packagist was silently dropping the v1.1.0 tag because this field overrode it. With the field gone, Packagist will pick this tag up automatically.
  • Removed minimum-stability: dev which was causing Composer to resolve Guzzle (and other deps) to dev-master.
  • Guzzle upgraded to ^7.9 (resolves to 7.10.0).
  • PHP constraint widened to ^7.2.5 || ^8.0.

Documentation (#35)

  • addUser and updateUser examples in the README no longer show the removed groups parameter that was causing "Unrecognized field 'groups'" errors.
  • updateRoster example typo fixed.