Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Coder2010 #1
Member since Jun 2010 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Directed presence - or other way to subscribe for Pres WITHOUT adding to Roster?
Hello Alex, all,

Please can you advise if it is possible to use Directed Presence in agsXMPP to create a one-to-one presence subscription with another XMPP user - WITHOUT adding that user to your Roster?  If so, how to build and send the Directed Presence in code?
Alternatively, do you have any other suggestions to achieve this (i.e. without Directed Presence)?

We do not want to "permanently" add contacts to user's roster when using the client we are building.  Perhaps a second "hidden" login session, with its own roster, could be used to subscribe and capture Presence events from the desired XMPP users, but I would really like to find a simpler route which does not require such a second login.

Thanks and best regards

Alex #2
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can send directed presence with the following code:

  1. var pres = new Presence {To = "", Show =};
  2. XmppCon.Send(pres);

If you want to use directed presence you have to send the presence to all users on your own.

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