Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
hexin #1
User title: to search knowledge
Member since Mar 2007 · 34 posts · Location: China
Group memberships: Members
Show profile · Link to this post
Subject: How to query for room information
n 'XEP-0045: Multi-User Chat', it describe that through the following method we can get the chat room information:

Example 6. User Queries for Information about a Specific Chat Room

<iq from='hag66@shakespeare.lit/pda'
id='disco2'
to='macbeth.shakespeare.lit'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

The room MUST return its identity and SHOULD return the features it supports:

Example 7. Room Returns Disco Info Results
<iq from='macbeth.shakespeare.lit'
id='disco2'
to='hag66@shakespeare.lit/pda'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='heath@macbeth.shakespeare.lit'
name='A Lonely Heath'/>
<item jid='darkcave@macbeth.shakespeare.lit'
name='A Dark Cave'/>
<item jid='forres@macbeth.shakespeare.lit'
name='The Palace'/>
<item jid='inverness@macbeth.shakespeare.lit'
name='Macbeth&apos;s Castle'/>
</query>
</iq>

In my implementation, I send the following iq to query for room information:

<iq from="fl@sysd-marry/agsXMPP"
id="agsXMPP_8"
type="get" to="testroom@conference.sysd-marry">
<query xmlns="http://jabber.org/protocol/disco#info" />
</iq>

but the server return the following iq:
<iq xmlns="jabber:client"
from="testroom@conference.sysd-marry"
to="fl@sysd-marry/agsXMPP"
type="result"
id="agsXMPP_8">
<query xmlns="http://jabber.org/protocol/disco#info"><feature var="http://jabber.org/protocol/disco#info" />
</query>
</iq>

why it can't return the room information?
Avatar
Alex #2
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by hexin:
<iq from='hag66@shakespeare.lit/pda'
id='disco2'
to='macbeth.shakespeare.lit'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

The example shows a disco items Iq


Quote by hexin:
<iq from="fl@sysd-marry/agsXMPP"
id="agsXMPP_8"
type="get" to="testroom@conference.sysd-marry">
<query xmlns="http://jabber.org/protocol/disco#info" />
</iq>

and you send and disco info Iq

Alex
Avatar
hexin #3
User title: to search knowledge
Member since Mar 2007 · 34 posts · Location: China
Group memberships: Members
Show profile · Link to this post
I'm sorry ,I paste the wrong.  I really want to show is as follow:
Example 6. User Queries for Information about a Specific Chat Room

<iq from='hag66@shakespeare.lit/pda'
    id='disco3'
    to='darkcave@macbeth.shakespeare.lit'
    type='get'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
   

The room MUST return its identity and SHOULD return the features it supports:

Example 7. Room Returns Disco Info Results

<iq from='darkcave@macbeth.shakespeare.lit'
    id='disco3'
    to='hag66@shakespeare.lit/pda'
    type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity
        category='conference'
        name='A Dark Cave'
        type='text'/>
    <feature var='http://jabber.org/protocol/muc'/>
    <feature var='muc_passwordprotected'/>
    <feature var='muc_hidden'/>
    <feature var='muc_temporary'/>
    <feature var='muc_open'/>
    <feature var='muc_unmoderated'/>
    <feature var='muc_nonanonymous'/>
  </query>
</iq>
Avatar
Alex #4
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
maybe its a server problem.
  • Which server software are you using?
  • Is the server public? So i could test it in your server.

Alex
Avatar
hexin #5
User title: to search knowledge
Member since Mar 2007 · 34 posts · Location: China
Group memberships: Members
Show profile · Link to this post
The server I use is openfire
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS