Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Professional XMPP Programming with JavaScript and jQuery
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional XMPP Programming with JavaScript and jQuery
This is the forum to discuss the Wrox book Professional XMPP Programming with JavaScript and jQuery by Jack Moffitt; ISBN: 978-0-470-54071-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XMPP Programming with JavaScript and jQuery section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 16th, 2014, 05:22 PM
Authorized User
Points: 182, Level: 3
Points: 182, Level: 3 Points: 182, Level: 3 Points: 182, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to tell another user's online status?

What's the best way to find out the online status of another user whose jid is known? Well here is how I am attempting to go about it

1) Send initial presence
Code:
MyNamespace.connection.send($pres());
2) Send directed presence stanza to the desired user
Code:
MyNamespace.connection.send($pres({to: "desired_users_jid@jabber.org"}).c("x",{xmlns:"http://jabber.org/protocol/muc"}).up().c("show").t(chat));
3) Add a handler prior to the sending initial presence line.
Code:
MyNamespace.connection.addHandler(Mynamespace.on_send_my_presence, null, "presense",  null, null);
From this point on, I'm confused. How does the contact's client handle the incoming stanza from me, such that I know what his online status is? Or am I even going about this the right way? I don't want to use subscriptions and rosters.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using User's Guide with Umbraco 5 jfennell BOOK: Umbraco User's Guide 0 March 11th, 2012 06:01 PM
Online Status? cuctruong BOOK: Professional XMPP Programming with JavaScript and jQuery 2 February 5th, 2012 06:43 PM
check online/offline status sophia BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 15th, 2010 12:56 PM
online/offline status sophia ASP.NET 3.5 Basics 5 December 14th, 2009 01:27 PM



All times are GMT -4. The time now is 03:53 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.