haydenwu / xmpp
Library for XMPP protocol (Jabber) connections
Requires
- php: ^5.6 || ^7.0 || ^8.0
- psr/log: ^1.0
Requires (Dev)
- behat/behat: ^2.5.5
- monolog/monolog: ^1.22
- phpunit/phpunit: ^5.7.20
- satooshi/php-coveralls: ^1.0
- symfony/console: ^2.8
- symfony/dependency-injection: ^2.8
- symfony/finder: ^2.8
Suggests
- psr/log-implementation: Allows more advanced logging of the xmpp connection
This package is auto-updated.
Last update: 2025-10-11 08:19:23 UTC
README
This is my fork of zorn-v/xmpp, which is a fork of fabiang/xmpp, a PHP library for XMPP protocol connections (Jabber).
The original README can be found in README.OLD.md.
Changes in this fork
Explicit MUC presence
A Presence stanza must be sent to a MUC before the client can chat in it. Previously, you must call setPassword(string) to imply the Presence's to is a MUC, no matter there's a password or not. Now you'll do that explicitly with setToChannel(bool).
Max history returned by room
$presence->setHistoryLimit(int|null) allows you to set maximum number of previous messages provided when joining a room room. When it's null, it'll follow the room's default.
Getting messages
A few updates on message buffer and $client->getMessages()'s return:
- Fixed
bodybeing empty when message is a reply. Now the body will be similar to"> FOO\nBAR"when so. - Added
typefield which will be either'chat'(Message::TYPE_CHAT) or'groupchat'(Message::TYPE_GROUPCHAT). - Added boolean
metafield which will betruewhen the message is not an actual chat message, e.g. when it notifies room subject or description.
LICENSE
BSD-2-Clause. See the LICENSE.