-
Notifications
You must be signed in to change notification settings - Fork 72
Typing notification plugin not working... #141
Comments
Please provide a debug log including the stanzas you receive. |
RECV: <message xmlns='jabber:client' type='chat' to='[email protected]/Candy' id='ab46a' from='[email protected]/smoku__'>
<x xmlns='jabber:x:event'>
<id/>
<composing/>
</x>
<composing xmlns='http://jabber.org/protocol/chatstates'/>
</message> and at https://github.com/candy-chat/candy/blob/v2.0.0/src/core/event.js#L790 we have } else if(msg.children('body').length > 0) {
// Private chat message
if(msg.attr('type') === 'chat' || msg.attr('type') === 'normal') {
[...]
self.Jabber.Room._checkForChatStateNotification(msg, roomJid, name);
// Unhandled message
} else {
return true;
} So, chatstates are checked only for message with a |
@smokku Would you drop a test case and potentially a fix? https://github.com/candy-chat/candy/blob/master/tests/candy/unit/core/event.js#L1266 |
Doh... If it was easy to fix, I would just post a diff. :-( |
As for the test case, drop https://github.com/candy-chat/candy/blob/master/tests/candy/unit/core/event.js#L1302-1303 bdd.describe('of state composing', function () {
var receiveMessage = function () {
testHelper.receiveStanza(
$msg({
to: '[email protected]',
from: '[email protected]/resource1',
type: 'chat'
})
- .c('body').t('Some message text')
- .up()
.c('composing', {xmlns: 'http://jabber.org/protocol/chatstates'})
);
}; "composing" message with a body is a unicorn. :) |
Hi,
Candy 2.0 with typing notifications is not working. I just check the code in plugin, its not getting "obj.chatstate", this value is undefined
The text was updated successfully, but these errors were encountered: