GithubHelp home page GithubHelp logo

candy-chat / candy Goto Github PK

View Code? Open in Web Editor NEW
1.3K 81.0 369.0 4.63 MB

JavaScript-based multi-user chat client for XMPP.

Home Page: http://candy-chat.github.io/candy

License: MIT License

JavaScript 93.08% CSS 3.13% HTML 0.86% Lua 1.81% Shell 1.11%
xmpp javascript chat

candy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

candy's Issues

Users with spaces

Created a few mock users with spaces in their user name. This is allowed in OpenFire, and to make sure it wasn't just a bug with OpenFire, I used their client Spark to test them out. It is a valid username. Candy does not allow logging in with a user name with any spaces; at least not from my testing. It would be a nice feature to be able to do so.

UI/UX tweaks

Message Pane

  • better readability (alternating colors, borders, more space ... ?)
  • highlight links in messages
  • better visualization of long nicknames

Modal Window

  • fix bad contrast (tooltips should match)
  • pimp form elements
  • decrease font size?
  • highlight error messages somehow? (should have no impact on JS side)

Message Form

Specifying formatted chat room names in the autojoin array.

The Demo Chat image on the Candy site shows rooms with spaces in the names.

http://amiadogroup.github.com/candy/public/images/screenshot.png

I would like to have my room names formatted that way, but don't see a way to do this directly from the candy configuration.

(I have several rooms auto-joined, but they all end up with names like the actual demo chat has... like "roomname" or "room_name123" etc... and I'd rather have "Room Name" etc.)

Is this something that can only be done with Bookmarks?

I see that the bookmarks support "name" and "jid" (from http://xmpp.org/extensions/xep-0048.html );

                  autojoin='true'
                  jid='[email protected]'>

But the autojoin array in the chat options seems to only allowing listing of basic JIDs to join.

message form wrapper code incorrect?

In Candy.View.Template.Room.form, the message-form-wrapper div is closed before the form, not after it. I had to "fix" this in order to get it to work correctly on my site.

Current code:


Fixed code:

Login never completes (Hangs on 'PrivacyList')

Hey,
Downloaded a copy of Candy, we use Jabber internally quite a bit so it would be awesome to get a nice web client. Unfortunately we seem to be having some issues. When logging in, the interface never loads it just hangs. I enabled debugging and the issue seems to be with the 'PrivacyList' call. It seems to timeout after 60 seconds then it's retried over and over again so the interface never loads.

The Jabber server is Openfire 3.7.0, I've tried with both the built in HTTP Binding and with Punjab. We don't have any issues with 'normal' (Desktop) clients and the server isn't overloaded. Is this an issue with Candy or our Jabber server?

Here's the full debug log

[Init] Debugging enabled
[Connection] Connecting
POST http://ipc.lan/candy/example/http-bind/

200 OK
        205ms   
SENT: <body rid='2633332357' xmlns='http://jabber.org/protocol/httpbind' to='ipc.lan' xml:lang='en' wait='60' hold='1' content='text/xml; charset=utf-8' ver='1.6' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind' inactivity='60' secure='true' authid='84a86793' content='text/xml; charset=utf-8' window='3' polling='15' sid='0a09e4161cffc80072efd2b710c53cfa435bd759' requests='2' wait='60'><stream:features xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mechanism>JIVE-SHAREDSECRET</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><auth xmlns='http://jabber.org/features/iq-auth'/></stream:features></body>
[Connection] Authenticating
POST http://ipc.lan/candy/example/http-bind/

200 OK
        88ms    
SENT: <body rid='2633332358' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'><auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/></body>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cmVhbG09ImNoYXQucm1nLmlvIixub25jZT0iQ2s0dkQ5SFdlZnF1QnY0WUtKTEVhK0xPQWEzL2VVN1dWd2xQNlNCMiIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge></body>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        94ms    
SENT: <body rid='2633332359' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'><response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9ImFkbWluIixyZWFsbT0iY2hhdC5ybWcuaW8iLG5vbmNlPSJDazR2RDlIV2VmcXVCdjRZS0pMRWErTE9BYTMvZVU3V1Z3bFA2U0IyIixjbm9uY2U9IjQzZmIzOWUyZWE1ZDc3MzAwYjMzZDU5ZDUyOTk5MjU3IixuYz0iMDAwMDAwMDEiLHFvcD0iYXV0aCIsZGlnZXN0LXVyaT0ieG1wcC9jaGF0LnJtZy5pbyIscmVzcG9uc2U9ImU5NmZlYWVmNzczZTczZDU1YmM5MDkzYTA3ZTdjZTU5IixjaGFyc2V0PSJ1dGYtOCI=</response></body>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cnNwYXV0aD1kMDA5Yjg1NTc2NDAzNDFmMzY1MmExMjMyNDVhMDE0Zg==</success></body>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        92ms    
SENT: <body rid='2633332360' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759' to='ipc.lan' xml:lang='en' xmpp:restart='true' xmlns:xmpp='urn:xmpp:xbosh'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><stream:features xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></stream:features></body>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        93ms    
SENT: <body rid='2633332361' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'><iq type='set' id='_bind_auth_2' xmlns='jabber:client'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>Candy</resource></bind></iq></body>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' to='ipc.lan/84a86793' type='result' id='_bind_auth_2'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>[email protected]/Candy</jid></bind></iq></body>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        88ms    
SENT: <body rid='2633332362' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'><iq type='set' id='_session_auth_2' xmlns='jabber:client'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq></body>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' to='[email protected]/Candy' type='result' id='_session_auth_2'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq></body>
[Connection] Connected
[Connection] Attached
POST http://ipc.lan/candy/example/http-bind/

200 OK
        104ms   
SENT: <body rid='2633332363' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'><presence xmlns='jabber:client'/><iq type='get' xmlns='jabber:client'><query xmlns='jabber:iq:private'><storage xmlns='storage:bookmarks'/></query></iq><iq type='get' from='[email protected]' id='get1' xmlns='jabber:client'><query xmlns='jabber:iq:privacy'><list name='ignore'/></query></iq><iq type='set' from='[email protected]' id='set2' xmlns='jabber:client'><query xmlns='jabber:iq:privacy'><active name='ignore'/></query></iq></body>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' to='[email protected]/Candy' type='result'><query xmlns='jabber:iq:private'><storage xmlns='storage:bookmarks'/></query></iq></body>
[Jabber] Bookmarks
POST http://ipc.lan/candy/example/http-bind/

200 OK
        90ms    
SENT: <body rid='2633332364' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client' to='[email protected]/Candy' type='error' id='get1'><query xmlns='jabber:iq:privacy'><list name='ignore'/></query><error code='404' type='cancel'><item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq><iq xmlns='jabber:client' to='[email protected]/Candy' type='error' id='set2'><query xmlns='jabber:iq:privacy'><active name='ignore'/></query><error code='404' type='cancel'><item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq></body>
[Jabber] PrivacyList
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.46s  
SENT: <body rid='2633332365' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.94s  
SENT: <body rid='2633332366' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        58.98s  
SENT: <body rid='2633332367' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.97s  
SENT: <body rid='2633332368' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        1m 0s   
SENT: <body rid='2633332369' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.91s  
SENT: <body rid='2633332370' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.88s  
SENT: <body rid='2633332371' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        1m 0s   
SENT: <body rid='2633332372' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.82s  
SENT: <body rid='2633332373' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/

200 OK
        59.93s  
SENT: <body rid='2633332374' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>
RECV: <body xmlns='http://jabber.org/protocol/httpbind'/>
POST http://ipc.lan/candy/example/http-bind/


SENT: <body rid='2633332375' xmlns='http://jabber.org/protocol/httpbind' sid='0a09e4161cffc80072efd2b710c53cfa435bd759'/>

libs.*.js contain duplicated contents

libs.bundle.js and libs.min.js both contain 5 complete copies of the contents.

libs.bundle.js is 718kB when it only needs to be 143kB, and libs.min.js is 220kB when it only needs to be 44kB.

role/affilliation undefined when calling Candy.View.Pane.Room.getRoom()

When I try and get the current user's role or affiliation the values are undefined although the user is the owner of the room.

The method I call is Candy.Core.getRoom(Candy.View.getCurrent().roomJid).getUser();

I also setup an presence observer Candy.Core.Event.addObserver(Candy.Core.Event.KEYS.PRESENCE, {update: function(obj, data) {
console.log(data);
return true;
}});

The room only has one user. So when I join I only get one presence event.

The currentUser.data has role and affiliation set to undefined but the user has role set to moderator and affiliation to owner.

Both objects have different values for their jids currentUser has jid of [email protected] and user has a full jid of [email protected]/digit1345294 but they are the same user.

In my opinion both object represent the same user and should have the same values with the same jid, role and affiliation.

I'm using ejabberd 2.1.2 and candy v1.0.3-0

Non-anonymous room does not open

I have OpenFire configured with non-anonymous rooms ("Show Real JIDs of Occupants to:" is set to "Anyone" in OpenFire).

When I try to enter one of these rooms with Candy, OpenFire sends an initial warning message with the text "This room is not anonymous" and a status code of 100 (see http://xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init). Apparently, this is breaking the room in Candy and preventing any messages from being displayed.

I think I've tracked this down to getResourceFromJid in strophejs being called by core/event.js: line 418 in Candy.Core.Event.Jabber.Room.Message in order to find the resource/user who sent the muc message. In the case of the warning message sent by the server, OpenFire seems to be sending a JID for the "from" attribute with no resource (and no '/') as in the following:

<message type='groupchat' from='roomname@chatserver' to='user@chatserver/Candy'><body>This room is not anonymous</body><x xmlns='http://jabber.org/protocol/muc#user'><status code='100'/></x></message>

Thus, getResourceFromJid in strophes is returning null and causing an error in Candy when handled by message observers.

I'm not exactly sure which is the best solution, but for me, I replaced line 418 in core/event.js with the following:

var resourceName = Strophe.getResourceFromJid(msg.attr('from'));
resourceName = (resourceName !== null) ? resourceName : ''; // a blank string works, but something like '(server)' might be better
message = { name: resourceName, body: msg.children('body').text(), type: msg.attr('type') };

Room list

Service discovery would be nice to have. Ie fetch a list of rooms on some service, and display it in a nice way.

Handle presence type = error

When e.g. user uses attaching for connection and then tries to do something he receives a presence type = error with not-authorized as one of the xml nodes. Handle this

scroll arrows on messages containing larger characters.

I have a chat for Japanese language learners, and people using Japanese characters see tiny scroll arrows next to their messages containing Japanese characters. Presumably because they're slightly larger than Latin chars.

http://i32.photobucket.com/albums/d12/phreadom/arrows.jpg
http://i32.photobucket.com/albums/d12/phreadom/arrows2.jpg

It appears that the problem is that Meiryo (the default font for Windows Vista) is a tiny bit larger than MS Gothic, and thus creates an overflow problem.

Setting "overflow: hidden" for ".message-pane dd" in the default.css (instead of auto) fixes the problem, although I'm not sure if this is the ideal solution? :)

Event hooks for plugins: Change from function-hooks to an observer

Currently it's not possible to have multiple plugins installed which use the same event hook.

For distributing core events to the core view, we already use an observer and it works pretty well.

So we need to change that as soon as possible because at the moment there aren't that much plugins yet which have to be changed the way they register for an event.

how can i use the anonymous model?

hello everybody!
first i would say my english is not very well

my question is : how can i change the user login model to the anonymous model? Just like the offical website demo!
i see the user guide that it is said to use this function "Candy.Core.connect(servername)" and i just change the default to "Candy.Core.connect("202.198.192.249")", but iit is no use ,just a blank grey window but no others.

who can help me! thanks a lot!

大家好!
首先我要说我的英语很烂,请见谅!

我的问题是:如何选用匿名登录,就像官方的一样?
我看了用户手册,说是用 "Candy.Core.connect(servername)"函数即可匿名,但是当我试着用"Candy.Core.connect("202.198.192.249")"来登录时,它只显示一张空白的灰色界面,除此外什么都不显示

谁能帮助我啊?非常感谢!

allow inpage integration

the chat integreates perfectly in fullscreen mode (or within an iframe)
but it should be possible to integrate it right into the page

i am currently working on this here: http://www.easy-coding.de/index.php?page=Chat
maybe i can resolve the style issues in my own.

first approaches

  • replace all "fixed" through "absolute" in default css
  • change html to this

Measure Performance for low-end devices

As we're using Candy in a big community in Switzerland, we see that there are some users reporting the issue about connection drops sometimes (as more people are in a muc-room the issues increase).

I didn't notice that on any of my machines, but as we're doing a lot of DOM updates etc. (also with animations), some machines may be too slow for it.

There's a thread in the strophe.js mailinglist about this: http://groups.google.com/group/strophe/browse_thread/thread/c20e36ca9a39abb9

It would be nice if we could try to measure performance with some tool and improve it if it's needed.

Performance optimizations: assign jQuery objects to variables

jQuery objects used more than once should always be assigned to variables.

Example using $(msg) repeatedly in Candy.Core.Event:

    var roomJid, message;
    if($(msg).children('subject').length > 0) {
        roomJid = Strophe.getBareJidFromJid($(msg).attr('from'));
        message = { name: Strophe.getNodeFromJid(roomJid),body: $(msg).children('subject').text(), type: 'subject' };
    } else if($(msg).attr('type') === 'chat') {
        roomJid = $(msg).attr('from');

Affected:

  • Candy.Core.Event
  • Candy.View.Pane.Roster

Wrong Timestamp when entering room

when i autojoin a room, i can see the last messages. but in candy all those messages have the current timestamp.
in a normal client like pidgin, the timestamps are correct.

allow xmpp commands like /help

will candy support the xmpp commands?
like affiliate, ban, clear, clearall, config, configure, debug, help, invite, join, kick, me, mood, msg, nick, part, ping, register, role, say, topic

Partially Blank Page after Connection

After connecting with candy, I get a blank screen. If I attempt to message the user connected via candy from another account, small bars on the top left and bottom right will appear. The bar on the top left will have a tab labelled with the username from the other account and a red box counting the number of messages received, the bar on the bottom right will contain icons for options such as auto scrolling and emoticons and room list. Nothing happens when I click these icons.

I have a working ejabberd server that works great with pidgin and gajim along with muc. I have followed all of the instructions on the installation and setup guides. I have browsed other issues here and at google code. I tried to update candy from the /dev branch. I have even included autojoin as I have been instructed both in the FAQ and in closed issues featuring a similar problem all to no avail.

I am able to connect to my server via candy and the server can see that there are users online. I have a persistent room open with a user in it.

Any ideas? Thank you.

New chat-tab button

A way to open a new tab with a new room. Perhaps like the New tab button in browsers.

I made this little hack for now:

$("#chat-tabs").bind("dblclick", function(event) {
    if(event.target == event.currentTarget) {
        var newRoom = prompt("Which room do you wish to join?");
        if(newRoom && newRoom.length > 0) {
            if(newRoom.indexOf("@") == -1) {
                newRoom += "@conference.example.com";
            }
            Candy.Core.Action.Jabber.Room.Join(newRoom);
        }
    }
});

Candy v1.0 - emoticons broken in example

There's currenty a bug in v1.0 where emoticons won't be displayed in the delivered example.
This doesn't happen when index.html and the res folder are placed in the same directory.

The problem
Candy.Util.Parser.emoticonDir doesn't apply the value of the resources option passed on init:

Candy.init('http-bind/', {
    view: { resources: '../res/' } // doesn't affect emoticons location
});

Workaround
Add the following line after Candy.init():

Candy.Util.Parser.emoticonDir = Candy.View.getOptions().resources + 'img/emoticons/';

Support for XEP-0071: XHTML-IM

Candy should have support for XEP-0071.

Because of possible XSS injections and to not break the appearance, we will simply use the plain version or remove the formatting.

Websockets: Try how Candy would work with it

Firefox6 supports now websockets as well as Chrome.

There exists a Strophe Fork with Support for Websockets.

We should try using that fork, of course it should be backwards compatible.

Password only connection method

My use case is that I'm using candy in a web application where the
users have authenticated to an ldap server to access the web site. I
also want the users to be able to access the jabber server from other
clients as well. The jabber server (ejabberd) is authenticating
against the ldap server as well. My web app caches the username so I
can build the JID for them, but I don't (and can't) cache the
passwords to use the connect(jid, pass) method.

something like connect(jid) and then the user is prompted for a password would be great.

Ejabberd: MUC Message interval - Denial reply is not parsed

When in ejabberd.cfg the following is defined for muc rooms:
{min_message_interval, 0.4}
{min_presence_interval, 4}

Ejabberd denies messages/presences which happen more often than that specific interval.
We currently do not parse this reply and this should be changed.

The denial reply is as follows:
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns='jabber:client' from='[email protected]' to='[email protected]/Candy' type='error' id='3694'><body xmlns='jabber:client'>d</body><x xmlns='jabber:x:event'><composing/></x><error code='500' type='wait'><resource-constraint xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Traffic rate limit is exceeded</text></error></message></body>

The error message should maybe be parsed through our translation.

Blank page but jabber comms ok

I have installed candy but all I am getting is a blank page !
I can see all the jabber communications going on in firebug and it is getting to the stage of doing the 'long polling' suggesting that everything is ready.
But, literally a blank page !

Cheers

Gary

Support Nickname changing

We should provide an easy way to support nickname changing.

Basicly there are two steps to do:

  1. Support e.g. Candy.Core.Jabber.Action.NicknameChange
  2. Maybe also something in the gui, although this could be done with a plugin or so

Handling Conflict: Two users using same nickname in the same room

Presence error: (this issue is related to #28)

<presence xmlns='jabber:client' from='somejid to='someotherjid' type='error'><x xmlns='http://jabber.org/protocol/muc'/><error code='409' type='cancel'><conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>That nickname is already in use by another occupant</text></error></presence>

sending and receives messages don't work on iPhone/iPad

I logged in with my account using Safari on iPhone and iPad and it works but strangely sending and receiving messages doesn't work. Using the debug feature of Safari I noticed that the message is well received by the client but for some reason is not processed.
If someone logs out the notification is displayed correctly to the other users and also messages sent in private are visible to the sender but not the receiver. Non private messages are not visible by both sender and receiver.

Join a default room if there's no bookmark.

Currently, when configured to use bookmarks stored in iq:private, and you don't have any, you get a black gray screen.

It would be nice if a default room could be joined in this case.

"Room Occupants" count increased sometimes when a user leaves the room.

I'm not sure if this because I have a user in my user list with escape sequences in their name. (we're running mod_auth_phpbb3.lua with Prosody to allow users with spaces etc in their names to still authenticate. They are automatically escaped... so "Joey Vega" would end up as "Joey\20Vega" etc. http://prosody.im/pastebin/41b9deec-7ebc-4f7a-85c2-57bd9668c075 )

I thought this only appeared in Firefox, but I now see it in both Chrome and IE9 as well... so apparently it's not just Firefox.

http://i32.photobucket.com/albums/d12/phreadom/roomcount5.png

And right now there are 8 people in the room, but it shows 30 etc. (Chrome and IE each show 24, since I joined with those later)

What suggestions would you have for how I might track this down? I don't see anything immediately suspicious in the Firefox web console log.

I have a number of other issues to work out with the escaped username, but I haven't started tackling that yet. (for instance you can't private message them. but I'll file those in a separate issue.)

the strophe js lib corrupts unicode JID nodes.

The strophe js lib corrupts unicode JID nodes as a shortcoming of javascript itself.
(Unicode node names are valid per http://xmpp.org/extensions/xep-0029.html#sect-id317032 )

This can be worked around using the method described at http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html and https://developer.mozilla.org/en/DOM/window.btoa#Unicode_Strings

Once the libs.bundle.js has been fixed as per the bug in #23 (to remove the redundant 4 copies of the code) , the following changes will allow unicode node names to work correctly.

--- libs.bundle.js      2011-08-24 23:33:12.433513000 -0400
+++ libs.bundle.fixed.js        2011-08-24 23:30:43.311983700 -0400
@@ -2983,9 +2983,9 @@
         } else if (do_sasl_plain) {
             // Build the plain auth string (barejid null
             // username null password) and base 64 encoded.
-            auth_str = Strophe.getBareJidFromJid(this.jid);
+            auth_str = unescape(encodeURIComponent(Strophe.getBareJidFromJid(this.jid)));
             auth_str = auth_str + "\u0000";
-            auth_str = auth_str + Strophe.getNodeFromJid(this.jid);
+            auth_str = auth_str + unescape(encodeURIComponent(Strophe.getNodeFromJid(this.jid)));
             auth_str = auth_str + "\u0000";
             auth_str = auth_str + this.pass;

@@ -3066,14 +3066,14 @@
             digest_uri = digest_uri + "/" + host;
         }

-        var A1 = MD5.hash(Strophe.getNodeFromJid(this.jid) +
+        var A1 = MD5.hash(unescape(encodeURIComponent(Strophe.getNodeFromJid(this.jid))) +
                           ":" + realm + ":" + this.pass) +
             ":" + nonce + ":" + cnonce;
         var A2 = 'AUTHENTICATE:' + digest_uri;

         var responseText = "";
         responseText += 'username=' +
-            this._quote(Strophe.getNodeFromJid(this.jid)) + ',';
+            this._quote(unescape(encodeURIComponent(Strophe.getNodeFromJid(this.jid)))) + ',';
         responseText += 'realm=' + this._quote(realm) + ',';
         responseText += 'nonce=' + this._quote(nonce) + ',';
         responseText += 'cnonce=' + this._quote(cnonce) + ',';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.