Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Karthik #1
Member since Aug 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Get list of Node Subscribers
Is there a way to get a listing of current subscribers (in JID format) to a particular pubsub node on the XMPP server, using the Matrix library?
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is described here:
http://xmpp.org/extensions/xep-0060.html#owner-subscriptio…

you can build the request packet with the following code:

  1. public Iq RequestSubscriptionsListStanza(Jid to, string node)
  2. {  
  3.     return new PubSubOwnerIq
  4.     {
  5.         Type = IqType.get,
  6.         To = to,
  7.         PubSub =
  8.         {
  9.             Subscriptions = new PubSub.Owner.Subscriptions{ Node = node }
  10.         },
  11.     };
  12. }

I have added a function for this to the PubsubManager. It will be available when I upload the next binary release.

Alex
Avatar
Karthik #3
Member since Aug 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Thank you, I managed to hack a solution based on your sample code to send an iq stanza requesting node subscriptions, and an iq event handler to parse the response from the server.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Great, new dll with a function for this is uploaded
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: