Quantcast
Channel: Code with Music
Viewing all articles
Browse latest Browse all 14

XEP 0045 – Multi User Chat (MUC) available methods in Jaxl 2.0

$
0
0

Jaxl 2.0.3 (Jabber XMPP Library in PHP) comes with 15 XMPP extensions including XEP-0045 a.k.a. Multi-User Chat (Conference Room). In this blog post, we will go through all the methods available for XMPP applications developed using Jaxl library.

Using MUC methods
You need to include Jaxl implementation of XEP-0045 in your application code to start using the methods listed below. Refer Jaxl Installation, Usage guide and Example apps if you are new to Jaxl. Here is how this can be done at the top of your application code:

// initialize Jaxl instance
$jaxl = new JAXL();

// include MUC XEP
jaxl_require('JAXL0045', $jaxl); // or simply $jaxl->requires('JAXL0045');

Multi-User Chat available methods:
Below is a detailed list of methods from multi-user room extension:

  • $jaxl->JAXL0045(‘joinRoom’, $jid, $roomJid.”/”.$nick, $history=0, $type=’seconds’)
  • $jaxl->JAXL0045(‘exitRoom’, $jid, $roomJid)
  • $jaxl->JAXL0045(‘kickOccupant’, $fromJid, $nick, $roomJid, $reason=FALSE, $callback=FALSE)
  • $jaxl->JAXL0045(‘getRoomConfig’, $jid, $roomJid, $callback=FALSE)
  • $jaxl->JAXL0045(‘setRoomConfig’, $jid, $roomJid, $fields, $callback=FALSE)
  • $jaxl->JAXL0045(‘grantOwnerPrivileges’, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)
  • $jaxl->JAXL0045(‘revokeOwnerPrivileges’, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)
  • $jaxl->JAXL0045(‘grantAdminPrivileges’, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)
  • $jaxl->JAXL0045(‘removeAdminPrivileges’, $fromJid, $toJid, $roomJid, $reason=FALSE, $callback=FALSE)

All parameters are mandatory to be passed while calling the above available methods. To be continued as more method gets added like banUser, destroyRoom, etc.


Viewing all articles
Browse latest Browse all 14

Latest Images

Trending Articles





Latest Images