Forums : Technical Issue Help

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

Jabber integration: Bot answers to wrong resource

Hello!

If I sent e.g. help to the bot, it answers to any of my other online resources but not to the one I am sending from.

My account is still online at home (notebook and desktop). When I send a message from my work account, the bot's answer is on my desktop account. If then I send a message from there, it answers to my laptop account.

By account in this case it's in fact the same account for all three locations, just different jabber resources online at the same time using different priorities. But the bot neither answers to the resource the message came from nor answers to the resource with the highest priority. It just seems to answer to the next resource it finds.

Kai Krakow over 15 years ago
 

Hi Kai,

The current implementation doesn't understand priorities (because the original author... your truly... didn't know about them either). As far as I knew/know XMPP, jabber IDs can include a resource identifier (eg: [email protected]/home or [email protected]/work).

When the ohloh jabber bot receives a message, it strips the resource identifier in order to resolve who this person is as registered on ohloh. However, it retains the entire JID with the resource in order to reply accordingly.

So if your home JID is kai@.../home and at work you have kai@.../work, messages sent from home should be replied to home and similarly for work.

However, if you have the exact same resource (eg: kai@.../me or something like this) everywhere - then I am under the impression that the routing decision is made by your jabber/xmpp service.

All this to say that I don't know if what you saw was a bug in my current implementation OR if I am missing a 'priority' feature. Could you please educate me?

Jason Allen over 15 years ago
 

Jason,

I am using the different resources at each location I log in from. That are .../Desktop, .../Laptop and .../Arbeit. The priorities are set to prefer messages being sent to my work location (Arbeit) because when I am online there that is also where I am in reality. Next priority is my laptop because when it is online I am probably there.

As far as I understood XMPP if you send a message with a resource included it is sent there, otherwise sent to the resource with highest priority.

So if your bot implementation does not send a resource it should have sent it right - it didn't. But that's okay because you've sent the resource as far as I understood.

But still the message didn't get to the right location. There may be something interferring from the google talk servers which adjusts priorities on its own. I will check it. Didn't try a non-gtalk jabber account yet.

Regards,
Kai

Kai Krakow over 15 years ago
 

The bot should be sending replys back to the user@server/resource, the priority mask at this time has been deffered for basing message routing on priority and until the bot responds to user@server/resource that should be considered a bug.

You can strip the resource for your own internal checks, just make sure you send the message to='user@server/resource' in the reply's and they will be routed to the correct client by the server.

dmex over 13 years ago
 

This is the message the bot is currently sending and its missing the resource field in the to address for correct routing.

http://pastebin.com/CxVvAjf5

dmex over 13 years ago