Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 December 19th, 2013, 07:12 AM
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 :)
  #2 (permalink)  
Old December 30th, 2013, 12:22 PM
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
 


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
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



All times are GMT -4. The time now is 10:12 PM.


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