Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
kostrin #1
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Request list of members in group chat room
So as I understand it each room has an assigned JID and you can use that JID to make queries on the room. I found a requestMemberList method which is good but it returns void. Is there anyway to get just a list of the JID's of the members without the asynchronous event call? If not, can someone show me some sample code of what it looks like to access those members in the event call?
Thanks in advance!
Avatar
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If you want synchronous call which I don't suggest you can use the IqGrabber class directly. There is also a member for sychronous calls with an timeout.

Here you can see an example of a MucManager call with the asychronous callback:
http://forum.ag-software.net/thread/832-Configuration-grou…

Are you really trying to get the members, or do you want to see the users which are in the room (participants).

Alex
Avatar
kostrin #3
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
yeah I think I have a misunderstanding of what the difference is. What I am looking to do is query a room JID to find if a specific user is contained in the room. If that user if found I want another member to be able to follow him into the room. What would you suggest I do?
Avatar
kostrin #4
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
Also what is the functional difference between muc.RequestInstantRoom() and muc.EnterRoom()?
Avatar
Alex #5
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
See here:
http://xmpp.org/extensions/xep-0045.html#createroom-instant

RequestInstant room does not create a room. JoinRoom is still required to create the room.
Avatar
kostrin #6
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #3
Quote by kostrin:
What I am looking to do is query a room JID to find if a specific user is contained in the room. If that user if found I want another member to be able to follow him into the room. What would you suggest I do?
Alex, do you mind answering this question as well.
Thanks
Avatar
Alex #7
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by kostrin:
What I am looking to do is query a room JID to find if a specific user is contained in the room. If that user if found I want another member to be able to follow him into the room. What would you suggest I do?

you can use service discovery to query a room for participants.
See here: http://xmpp.org/extensions/xep-0045.html#disco-roomitems

But this normally gives you only the nickname (roomjid+nickname) of the participants and not the real Jids.

You normally get the real Jid only when you are an admin of the room, or the rooms and configured to show real Jids to everybody. And you get it only with the presence then when you join the room.

Alex
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