Subject: MUC subscription
Hi everyone! I'm trying to get the list of all rooms that I'm subscribed to, but can't find a proper Subscriptions element or API to implement it.
I checked if my service supports this feature
Request:
Response:
After that I want to send send the following request to get the list of subscriptions:
And subscribe on a room
Please, can you help me to find a proper API ?
I checked if my service supports this feature
Request:
- <iq from={user-jid}
- to='conference.localhost'
- type='get'
- <query xmlns='http://jabber.org/protocol/disco#info'/>
- </iq>
Response:
- <query xmlns="http://jabber.org/protocol/disco#info">
- <identity name="Chatrooms" type="text" category="conference" />
- <feature var="http://jabber.org/protocol/disco#info" />
- <feature var="http://jabber.org/protocol/disco#items" />
- <feature var="http://jabber.org/protocol/muc" />
- <feature var="vcard-temp" />
- <feature var="urn:xmpp:mucsub:0" />
- <feature var="http://jabber.org/protocol/muc#unique" />
- <feature var="jabber:iq:register" />
- <feature var="http://jabber.org/protocol/rsm" />
- <x type="result" xmlns="jabber:x:data">
- <field var="FORM_TYPE" type="hidden">
- <value>http://jabber.org/network/serverinfo</value>
- </field>
- </x>
- </query>
After that I want to send send the following request to get the list of subscriptions:
- <iq from={user-jid}
- to={room-jid}
- type='get'
- id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
- <subscriptions xmlns='urn:xmpp:mucsub:0' />
- </iq>
And subscribe on a room
- <iq from={user-jid}
- to={room-jid}
- type='set'
- id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
- <subscribe xmlns='urn:xmpp:mucsub:0' nick='mynick'>
- <event node='urn:xmpp:mucsub:nodes:presence' />
- <event node='urn:xmpp:mucsub:nodes:messages' />
- <event node='urn:xmpp:mucsub:nodes:affiliations' />
- <event node='urn:xmpp:mucsub:nodes:subscribers' />
- <event node='urn:xmpp:mucsub:nodes:subject' />
- <event node='urn:xmpp:mucsub:nodes:config' />
- <event node='urn:xmpp:mucsub:nodes:system' />
- </subscribe>
- </iq>
Please, can you help me to find a proper API ?
This post was edited 5 times, last on 2019-10-14, 12:27 by Alex.