简体   繁体   中英

HipChat Nodejs Bot - Cant receive room messages

I am trying to create an hip chat bot with nodejs. The main library is node-xmpp. However at the moment the build is failing and I think thats why my nom install doesn't work.

Any who I managed to write my own version based on the core modules. - node-xmpp-client - node-xmpp-component - node-xmpp-jid

I can see messages fine and send. But only private! although I am registered in a room I cannot see room messages.

The source code of node-xmpp says thats a message or stanza should have a type and from that understand if the message is private or not. Well to me only private messages come. I wonder if its an issue with Hipchat.

If you want to take a look at the code, I made a github repo as it would an overkill to page here. github

The 'problem' lies with the xmpp protocol itself. Due to the way the protocol works, you need to have joined the room before you can receive messages from it. Why I was, lead to believe otherwise, was because hip chat showed the user as online on the room, but in reality he is not online on the group he is just online.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM