simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
301 stars 90 forks source link

listener for when a buddy is typing? #13

Closed silverbucket closed 11 years ago

silverbucket commented 11 years ago

Hi, i was wondering if there was a listener that could be used when a buddy starts/stops typing?

arunoda commented 11 years ago

good question. I hope there is some stanza available for that. Can some XMPP geek can answer for this?

silverbucket commented 11 years ago

there is a stanza for it, when I was using node-xmpp, i would get the stanza come in when i set up a listener, but i switched to node-simple-xmpp in the hopes that i could avoid dealing with the XML directly, and get the common behavior simplified. so far, simple-xmpp can do everything i need except the typing alert(s) :)

is it just that you need to see what the XML looks like to implement it? Or that you wanted to know if it exists at all?

arunoda commented 11 years ago

If you can provide me the XML for those, I can integrate them as an event. Is those event are specific to service(like Gtalk, FB) or is it based on the standard.

Anyway, you can listen to each and every stanza here See here for how you can check for it

nilclass commented 11 years ago

Those are called "chat states" and standardized in XEP-0085.

silverbucket commented 11 years ago

this looks great, thanks @nilclass - i will update the docs as well.