Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
javanesevn #1
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Subject: Destroy Element can not find
Hello,

I destroyed room when members are joining and received presence, see below.
       Destroy destroy = (Destroy)presence.SelectSingleElement(typeof(Destroy), true);
  or  Destroy destroy = (Destroy)presence.MucUser.SelectSingleElement(typeof(Destroy), true);

<presence xmlns="jabber:client"
         from="room_20081127111851@conference.xmpp01/test1"
         to="test1@xmpp01/home" type="unavailable">
                    <x xmlns="http://jabber.org/protocol/muc#user">
                              <item role="none" affiliation="none" />
                              <destroy><reason>Room 1 is destroyed </reason></destroy>
                    </x>
</presence>


Do traverse all element tree data but Destroy element could not find. What is wrong in presence?

Best regards,
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
destroy can occur in 2 namespaces
  • http://jabber.org/protocol/muc#user
  • http://jabber.org/protocol/muc#owner

it was defined only in http://jabber.org/protocol/muc#owner, I added a second destroy class for http://jabber.org/protocol/muc#user. The new code is in SVN.

There are 2 Destroy objects now:
  • agsXMPP.protocol.x.muc.owner.Destroy
  • agsXMPP.protocol.x.muc.user.Destroy

Alex
This post was edited on 2013-03-17, 13:58 by Alex.
Avatar
javanesevn #3
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Thank you very much, Alex.

I checked new code out. And report you as soon as.
Avatar
javanesevn #4
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Dear Alex,

Your addition code is work for me. Thank you so much.
You have a deep understanding about XMPP. :D

Best,
Avatar
javanesevn #5
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Hello Alex,

Client maintains list of created-room. And I can only delete room when I already joined into room.
If I do not join to room, I can not destroy room and server has not been responded anything.

Here is IQ sent:

  1. <iq xmlns="jabber:client" id="agsXMPP_185" type="set"
  2.          to="Room__20081128024457@xmpp01">
  3.          <query xmlns="http://jabber.org/protocol/muc#owner">
  4.                <destroy><reason>Room__20081128024457 will deleted</reason></destroy>
  5.          </query>
  6. </iq>

Anything wrong?

Best,
This post was edited on 2013-03-17, 13:59 by Alex.
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
thats correct and how it works.
Some servers also have methods to destroy rooms without beeing an participant of the room, but this are special server features and not documented in the XEPs. I you want to use sich features then consult the docs of your server.

Alex
Avatar
javanesevn #7
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
Thank you Alex, I also think this problem related to server.
Because I could destroy and receive "result type" when I joined into room.
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