NodeJS SDK : Event rainbow_onbubbletopicchanged is never raises
AnsweredHi,
Function:
rainbowSDK.events.on('rainbow_onbubbleaffiliationchanged', function(bubble) {
// do something the affiliation of a user in that bubble changes
});
never raises.
When modifying bubble's name, event contains topic + name:
6/12/2018 10:23:29 AM [1528791809102] - debug: XMPP - (handleXMPPConnection) raw in - << <message xmlns='jabber:client' xml:lang='en' to='cdea0b3ce9124a63bfbc244b98bdb851@openrainbow.com/node_jfw6y64h' from='pcloud_enduser_7@openrainbow.com/1564415765858990284911346181' type='management' id='526bfbed-f77c-4293-84e6-c1723b8e7695_414159'><room xmlns='jabber:iq:configuration' roomid='5b1f768c1a9dd26b78c31ecd' roomjid='room_fe14b14c148b4c458792a0ac7e832a9e@muc.openrainbow.com' topic='My topic' name='My Subject changed'/></message>
In file rainbow-node-sdk\lib\connection\XMPPServiceHandler\conversationEventHandler.js, test condition checks topic then name.
As topic is present in event, name's change is not "seen".
So there are 2 issues:
- Topic is present in event even if it's not changed
- test condition should test:
if (node.attrs.name) {...}
if (node.attrs.topic) {...}
To raise each event (nameChanged & topicChanged)
Instead of:
else if (node.attrs.name) {...}
else if (node.attrs.topic) {...}
Which raise only 1 event
Bertrand
Please sign in to leave a comment.
Comments
2 comments