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 December 19th, 2013, 07:12 AM
Registered User
 
Join Date: Oct 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Tabs Chat

I've tried the Chapter 6 - Gab Project.
And I've implemented session attachment to BOSH.
But I'm having problem with multiple chat windows/tabs in my browser.
When a user send message to someone, the message that him/her sent will not be broadcast to another windows/tabs.
I've try to manipulate a user to send message to him/herself like this:

var myOwnMessage = $msg({to: myJid, "type": "chat"}).c('body').t(body).up().c('active', {xmlns: "http://jabber.org/protocol/chatstates"});
Chat.connection.send(myOwnMessage);

but the message seems not delivered.
What should I do to accomplish this task?
Thanks in advance :)
 
Old December 30th, 2013, 12:22 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

You need to send the message to the bare JID instead of the full JID. A full JID will deliver the message only to a particular resource. A bare JID will deliver it to the account's session manager, which will deliver it to one or more full JIDs. Most servers will deliver it to the highest priority level and to all sessions tied with that priority level.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve corresponding information from multiple tabs based on criteria in EXCEL littlerauws Excel VBA 1 August 23rd, 2013 10:03 AM
Page not working in IE 7(Multiple tabs opened) abinashpatra ASP.NET 2.0 Professional 1 March 13th, 2009 09:49 AM
Worksheets (tabs) paul20091968 Excel VBA 1 December 12th, 2006 04:33 AM
Tabs in a string? Ric_H ADO.NET 1 April 24th, 2006 09:03 PM
Tabs dkr72 C# 1 December 3rd, 2004 02:42 PM





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