Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
rameshkasi #1
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: how to find out the user belongs to which group?
Dear Alex,

I have developed a chat application by using agsxmpp. I can able to get the group name from roster item. But i couldn't get my group name. After login , user want to know that he belongs to which group .if it possible by using IQ or anyother way, please advice me how to retrieve.

Thanks.

- Ramesh Kasi
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there is no "my group name". Because you can be in a different group at each of your contacts.
There is also no extension in XMPP to ask for the group, but you can write an own extension for this using IQs.

Alex
Avatar
rameshkasi #3
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Retrieve my group name
Dear Alex,

Thanks for your reply.

I have configured my user id with multiple groups in openfire.The User properties option is showing the user details with multiple groups under Users/Groups in openfire. I sent the IQ with "jabber:iq:register" or "vcard-temp" to get user profile details. But It doesn't provide my group details. so please provide me some sample extension to fetch my group.

Thanks
Ramesh Kasi
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you get the groups from the RosterItem object in the OnRosterItem event.

  1. private void XmppCon_OnRosterItem(object sender, agsXMPP.protocol.iq.roster.RosterItem item)
  2. {
  3.    var groups = item.GetGroups();
  4.    // add you code to loop all groups here
  5. }
Avatar
rameshkasi #5
Member since Jun 2010 · 17 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Dear Alex,

Yes. you are right!

I can able to get the group name for roster's OnRosterItem Event. This is not my requirement.
Actually i'm looking for how to get my group name not roster or friends.

Kindly advice me to proceed further.

Thanks
Ramesh Kasi
Avatar
Alex #6
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you have to ask each of your contacts in which group you are. There is no other way for doing this.
You can automate this process with Iqs. The custom packet tutorial is where you should start.

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