#1238 closed defect (wontfix)

Auto-join rooms doesn't work in hip-cat branch

Reported by: philip.colmer@… Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.4.1
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:


With the hip-cat branch, it is possible to /join a room without needing to have previously added the room's Jabber ID to the hipchat configuration in bitlbee.

If you then go:

channel #room set auto_join true

this appear to work but then when you "save", the room does not get added to the configuration file.

Attachments (0)

Change History (12)

comment:1 Changed at 2015-11-23T14:22:22Z by dx

Resolution: wontfix
Status: newclosed

Yeah, sorry, known issue and not going to be fixed, it's by design. That branch isn't supported, and it's pretty much on a dead end with its own hacky approach to adding channels that I don't really like but some people seem to tolerate.

I recommend using the master branch, which has all the other hipchat features, and add your channels manually.

I'll eventually figure out a completely different approach to this problem and delete that branch.

comment:2 Changed at 2015-11-23T14:26:20Z by philip.colmer@…

The reason I switched over to the hip-cat branch is because we're trying to use HipChat with IRC clients with minimal hassle ... and having to look up Jabber IDs is hassle :(.

Adding channels manually is causing me a lot of grief so I'm stuck between two rocks of grief now - manual channel adds or auto-join not working.

comment:3 Changed at 2015-11-23T14:28:21Z by wilmer

It may be better to fix this with a clever IRC client alias that would create the channel on-the-fly?

comment:4 in reply to:  3 Changed at 2015-11-23T14:39:04Z by philip.colmer@…

Replying to wilmer:

It may be better to fix this with a clever IRC client alias that would create the channel on-the-fly?

Wouldn't that be dependent on the capabilities of the IRC client?

Given that there is support for HipChat within bitlbee, it would be nice to get that support to be as broad-ranging as possible and joining rooms does seem to be one of the last big hurdles.

As far as I can tell, anyway.

There seem to be a few blog posts about using bitlbee with HipChat so it seems to be quite a popular gateway service but joining rooms is, as it stands, quite a painful process because of the need to open a web page to get the Jabber ID.

comment:5 Changed at 2015-11-23T14:41:25Z by dx

I have this (incomplete) code to be able to do chat add hipchat "channel name" and it will do some mangling of the name to generate the JID, which so far seems to guess everything right. Would that be enough for you?

/* Returns a newly allocated string that tries to match the "slug" part of the JID using an
 * approximation of the method used by the server. This might fail in some rare conditions
 * (old JIDs generated a different way, locale settings unicode, etc) */
char *hipchat_make_channel_slug(const char *name)
       char *lower;
       char *new = g_malloc(strlen(name) + 1);
       int i = 0;

       do {
               if (*name == ' ') {
                       new[i++] = '_';
               } else if (*name && !strchr("\"&'/:<>@", *name)) {
                       new[i++] = *name;
       } while (*(name++));

       new[i] = '\0';

       lower = g_utf8_strdown(new, -1);

       return lower;

comment:6 Changed at 2015-11-23T14:49:06Z by philip.colmer@…

If I may make a suggestion ... if the user tries to /join a room and the room hasn't already been added to the hipchat configuration, how about automatically adding it? I.e. by going through the steps that would be gone through if the user had done 'chat add hipchat "channel name"' first anyway.

That way, the user doesn't have to do as much but the bitlbee side of things still gets the channel added properly to the configuration.

It also then solves the problem that we have at the moment with the master branch implementation that a user can go "/join #foo" and it seems to work but they haven't actually joined anything because they didn't add the channel first.

comment:7 Changed at 2015-11-23T15:15:11Z by dx

Yes, that's an idea. But easier said than done. Like i said before, I'll eventually figure out a completely different approach to this problem.

One problem with that idea is when the user has several accounts. And this would have to be implemented in the irc layer, but it wouldn't work for any other protocol, since hipchat is probably the only one that has predictable name -> internal ID mappings, with a single server as opposed to the multiple servers in federated jabber.

comment:8 Changed at 2015-11-23T15:29:09Z by philip.colmer@…

Ah, yes, I hadn't appreciated that a simple "/join" command wouldn't give bitlbee enough information as to which service needed the room to be defined.

Sorry about that.

OK - yes, if you can make it easier to add a channel to a hipchat configuration, that would at least avoid the need to go to the web page to get the Jabber ID.

Thank you.

comment:10 Changed at 2015-11-24T14:09:55Z by philip.colmer@…


Unless I'm misunderstanding the syntax, this doesn't work if the room name has spaces in it.

We have, for example, a room called "Apple Movie Trailers". If I try:

chat add hipchat apple movie trailers

and then:

chat list

bitlbee seems to define "#movie" but the code has mapped that onto #apple.

Is it possible to use more of the code from the hip-cat branch so that the room list is actually queried in order to make a match, rather than guessing (as implied by comments in the code, not a slur on my part)?

Of course, it may be that I'm misunderstanding how to specify a multi-word room name with the "chat add" command :)

comment:11 Changed at 2015-11-24T14:16:32Z by dx

Use quotes:

chat add hipchat "apple movie trailers"

I also added a few notes on usage here, "Groupchats in development versions" section:

comment:12 Changed at 2015-11-24T14:21:32Z by philip.colmer@…

I could have sworn I tried that :)

Thank you.

Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.