Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2013-09-08 22:18:21
Size: 2066
Editor: host109
Comment: create hipchat page
Revision 10 as of 2015-02-21 06:42:26
Size: 5859
Editor: dx
Comment: new branch url
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Setting up Hipchat with !BitlBee = = Setting up Hipchat with BitlBee =
Line 3: Line 3:
[[https://www.atlassian.com/software/hipchat/overview|Hipchat]] is a chat service by Atlassian that provides an XMPP bridge. It's the choice of many businesses, as it supports mission critical features like pasting images and having them show up inline in the chat, and silly meme-like things that happen if you type things like "(awwyeah)". As such, it's only used by people who have no other choice. If you can decide what chat service to use, please get a real XMPP server with real XMPP clients instead. [[https://www.atlassian.com/software/hipchat/overview|Hipchat]] is a chat service by Atlassian that provides an XMPP server. It's the choice of many businesses, as it supports mission critical features like pasting images and having them show up inline in the chat, and silly meme-like things that happen if you type things like "(awwyeah)".
Line 5: Line 5:
Since there are several issues with hipchat, this page tries to document workarounds to use it with bitlbee. As such, it's only used by people who have no other choice. If you can decide what chat service to use, please get a real XMPP server with real XMPP clients instead.
Line 7: Line 7:
== JIDs == Official information on their XMPP, including technical details, is available [[http://help.hipchat.com/knowledgebase/articles/64377-xmpp-jabber-support-details|here]]

<<BR>>

== hip-cat branch ==

'''Update:''' New location for the branch: https://github.com/bitlbee/bitlbee/tree/feat/hip-cat - the old one won't be updated anymore and may be removed.

I (dx) have a [[https://github.com/bitlbee/bitlbee/tree/feat/hip-cat|branch]] that adds special support for hipchat accounts. It's not yet completely ready to be merged but it has several nice improvements that make it much less painful.

To get it:

{{{
apt-get install -y git libglib2.0-dev
git clone https://github.com/bitlbee/bitlbee.git
cd bitlbee
git checkout feat/hip-cat
}}}

Then do the rest of the build as usual

{{{
./configure
make
make install
}}}

Or for debian/ubuntu: {{{dpkg-buildpackage}}}


=== Initial setup ===

If you had a "jabber" account with hipchat, delete it with {{{account jabber del}}} (ensure it's the correct one before doing that)

Use the same account username you'd use in the official client, and protocol "hipchat" instead of "jabber":

{{{
account add hipchat your@email.com <password>
account hipchat on
}}}

That's all.

=== Improvements ===

 * Your mention name is set for all group chats automatically.
 * Mention names for other people are used as nicks by default. You just need to add @ in front of them to actually 'mention' other people.
 * As an experimental feature, the whole channel list is fetched from the server and added locally. Use "channel list" or just /list to view them.
     * Because of this, you can just do "/join #channel"
 * "Message from unknown participant" are now shown as coming from "[unknown]"
     * Also those should happen less often when joining channels.
 * Fixed channel topics.

=== Known issues ===

If you have any problems with this branch, please join #bitlbee (irc.oftc.net) and ping me (dx)!

 * HTML handling from hipchat bots is still weak.
 * Reconnecting may create duplicate channels in the list (like #chat_000)
 * If you're using gtalk/facebook with oauth, you'll need to remove the accounts and re-add with "account add (gtalk|fb) username"

But, well, that's nothing compared to the issues in the rest of this page.

<<BR>>

-----

<<BR>>

== Workarounds for mainline bitlbee ==

If you can't use the hip-cat branch for any reason, here's the list of workarounds you need to apply.

Again, '''ignore all this if you used the hip-cat branch'''.

<<BR>>

=== Initial setup ===

Get your account details from [[https://www.hipchat.com/account/xmpp|this page]], and use your jabber ID here:

{{{
account add jabber 123456_789012@chat.hipchat.com
account jabber set tag hipchat
}}}
Line 11: Line 95:
Fix nick display by setting nick_format and nick_source  Fix nick display by setting nick_source:
Line 14: Line 98:
account hipchat set nick_format %full_name
Line 18: Line 101:
''(TODO: maybe only one of these is required)'' === Groupchats ===
Line 20: Line 103:
== Groupchats == Groupchats require you to have a "nick" set to your real name (`Givenname Surname`), otherwise you'll get an error on /join ("not-acceptable: Please use the nickname...")
Line 22: Line 105:
Groupchats require you to have a "nick" set to your real name (`Givenname Surname`), otherwise you'll get an error on /join.

Additionally, the channel names are in the format "123456_chat_name" where 123456 is the company-wide account ID.
Additionally, the channel names are in the format `#123456_chat_name` where 123456 is the company-wide account ID.
Line 30: Line 111:
chat #channel_name set nick 'Givenname Surname' channel #channel_name set nick 'Givenname Surname'
Line 35: Line 116:
== Highlights/mentions == === Highlights/mentions ===
Line 37: Line 118:
Do @username instead of "username:". The problem is that we don't know what this "username" is supposed to be, since it's some sort of nick that can be different from the real name. Do `@mention_name` instead of `username:`. Otherwise people won't notice your messages are addressed to them. A great feature.
Line 39: Line 120:
A client script to automate this would be nice. This mention_name comes from `<item mention_name="...">` in the roster. This value isn't parsed by bitlbee, so the only way to get it is enabling [[Debugging|xmlconsole]] or using one of the official clients.
Line 41: Line 122:
== Debugging == === "Message from unknown participant" when joining channel ===
Line 43: Line 124:
If you want to figure out something, you can try enabling the [[Debugging|XMPP xmlconsole]] to your contacts Since the server sends wrong JIDs for the "from" field (`123456_chat_name@conf.hipchat.com/real name here`), all you can do is using client scripts to fix this up. If you write something to do this, add it here.

Using the `trigger.pl` script from Wouter Coekaerts (download [[http://wouter.coekaerts.be/irssi/trigger|here]]), you can add the following trigger to replace "Message from unknown participant " with a blank string to hide it:

{{{
/TRIGGER ADD -all -nocase -regexp '^Message from unknown participant ' -replace ''
}}}

For weechat:

{{{
/filter add hipchat_unknown_participant * nick_root ^Message from unknown participant
}}}

For emacs erc:

{{{
(defun my-reformat-jabber-backlog ()
  (save-excursion
    (goto-char (point-min))
    (if (looking-at
      "^<root> Message from unknown participant Your Name:")
     (replace-match "<yournick>"))))
(add-hook 'erc-insert-modify-hook 'my-reformat-jabber-backlog)
}}}

=== Debugging ===

If you want to figure out something, you can try enabling the [[Debugging|XMPP xmlconsole]] to your contacts. Good luck with that.

Setting up Hipchat with BitlBee

Hipchat is a chat service by Atlassian that provides an XMPP server. It's the choice of many businesses, as it supports mission critical features like pasting images and having them show up inline in the chat, and silly meme-like things that happen if you type things like "(awwyeah)".

As such, it's only used by people who have no other choice. If you can decide what chat service to use, please get a real XMPP server with real XMPP clients instead.

Official information on their XMPP, including technical details, is available here


hip-cat branch

Update: New location for the branch: https://github.com/bitlbee/bitlbee/tree/feat/hip-cat - the old one won't be updated anymore and may be removed.

I (dx) have a branch that adds special support for hipchat accounts. It's not yet completely ready to be merged but it has several nice improvements that make it much less painful.

To get it:

apt-get install -y git libglib2.0-dev
git clone https://github.com/bitlbee/bitlbee.git
cd bitlbee
git checkout feat/hip-cat

Then do the rest of the build as usual

./configure
make
make install

Or for debian/ubuntu: dpkg-buildpackage

Initial setup

If you had a "jabber" account with hipchat, delete it with account jabber del (ensure it's the correct one before doing that)

Use the same account username you'd use in the official client, and protocol "hipchat" instead of "jabber":

account add hipchat your@email.com <password>
account hipchat on

That's all.

Improvements

  • Your mention name is set for all group chats automatically.
  • Mention names for other people are used as nicks by default. You just need to add @ in front of them to actually 'mention' other people.
  • As an experimental feature, the whole channel list is fetched from the server and added locally. Use "channel list" or just /list to view them.
    • Because of this, you can just do "/join #channel"
  • "Message from unknown participant" are now shown as coming from "[unknown]"
    • Also those should happen less often when joining channels.
  • Fixed channel topics.

Known issues

If you have any problems with this branch, please join #bitlbee (irc.oftc.net) and ping me (dx)!

  • HTML handling from hipchat bots is still weak.
  • Reconnecting may create duplicate channels in the list (like #chat_000)
  • If you're using gtalk/facebook with oauth, you'll need to remove the accounts and re-add with "account add (gtalk|fb) username"

But, well, that's nothing compared to the issues in the rest of this page.




Workarounds for mainline bitlbee

If you can't use the hip-cat branch for any reason, here's the list of workarounds you need to apply.

Again, ignore all this if you used the hip-cat branch.


Initial setup

Get your account details from this page, and use your jabber ID here:

account add jabber 123456_789012@chat.hipchat.com
account jabber set tag hipchat

The jabber IDs of hipchat accounts are in the format 123456_789012@hipchat.com where 123456 is the company-wide account ID and 789012 is your user account ID.

Fix nick display by setting nick_source:

account hipchat set nick_source full_name

Groupchats

Groupchats require you to have a "nick" set to your real name (Givenname Surname), otherwise you'll get an error on /join ("not-acceptable: Please use the nickname...")

Additionally, the channel names are in the format #123456_chat_name where 123456 is the company-wide account ID.

The best way to get this working is to avoid using the usual "invite" method of joining channels and add the channels manually before you join them.

chat add hipchat 123456_chat_name@conf.hipchat.com #channel_name
channel #channel_name set nick 'Givenname Surname'

Note that you can't rename channels - you have to remove and re-add them.

Highlights/mentions

Do @mention_name instead of username:. Otherwise people won't notice your messages are addressed to them. A great feature.

This mention_name comes from <item mention_name="..."> in the roster. This value isn't parsed by bitlbee, so the only way to get it is enabling xmlconsole or using one of the official clients.

"Message from unknown participant" when joining channel

Since the server sends wrong JIDs for the "from" field (123456_chat_name@conf.hipchat.com/real name here), all you can do is using client scripts to fix this up. If you write something to do this, add it here.

Using the trigger.pl script from Wouter Coekaerts (download here), you can add the following trigger to replace "Message from unknown participant " with a blank string to hide it:

/TRIGGER ADD -all -nocase -regexp '^Message from unknown participant ' -replace ''

For weechat:

/filter add hipchat_unknown_participant * nick_root ^Message from unknown participant  

For emacs erc:

(defun my-reformat-jabber-backlog ()
  (save-excursion
    (goto-char (point-min))
    (if (looking-at
         "^<root> Message from unknown participant Your Name:")
        (replace-match "<yournick>"))))
(add-hook 'erc-insert-modify-hook 'my-reformat-jabber-backlog)

Debugging

If you want to figure out something, you can try enabling the XMPP xmlconsole to your contacts. Good luck with that.

BitlBee Wiki: HowtoHipchat (last edited 2018-08-04 05:58:56 by dx)