Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 16th, 2014, 05:22 PM
Authorized User
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
2) Send directed presence stanza to the desired user
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.
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.

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.