Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HipChat generates rooms with "," #265

Open
mcfilib opened this issue Dec 2, 2015 · 2 comments
Open

HipChat generates rooms with "," #265

mcfilib opened this issue Dec 2, 2015 · 2 comments

Comments

@mcfilib
Copy link

mcfilib commented Dec 2, 2015

For whatever reason, HipChat generated a room with an XMPP JID of the following form.

In this part of hubot-hipchat, you rely on the ability to split on "," but in our case this breaks because HipChat has generated an XMPP JID with a comma in it.

Can you think of any cunning ways to work around this without creating a new channel? Thanks folks!

@cycomachead
Copy link

Haven't tested this, but this could be a work-around:

Does the JID always include the full room domain? (If not this won't work...)
If you split on .hipchat.com,. To do this, you'd either need a more complicated regex in split, using a lookahead, or to just re-join the domain with the first part of the JID.

If this were merged into the master, we'd probably need to split on HUBOT_HIPCHAT_HOST (or hipchat.com) for robustness...

@SamWhited
Copy link

I'm reasonably sure that comma's are always allowed in JID local parts unless they're at the start (or end if a RTL marker is present) of the label (in which case they violate the directionality rule of the UserNameCaseMapped profile of the PRECIS IdentifierClass, although I think having a number at the start of a JID is disallowed too, but I'm not aware of any implementation that actually follows that rule).

See the first bullet point of the BIDI rule (which is specified as the directionality rule for the profile used by localparts): https://tools.ietf.org/html/rfc5893#section-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants