Home

Awesome

lita-hipchat

Build Status Code Climate Coverage Status

lita-hipchat is an adapter for Lita that allows you to use the robot with HipChat.

Installation

Add lita-hipchat to your Lita instance's Gemfile:

gem "lita-hipchat"

Configuration

Values for all of the following attributes can be found on the "XMPP/Jabber info" page of the account settings on the HipChat website. A JID (Jabber ID) looks like "12345_123456@chat.hipchat.com".

Required attributes

Optional attributes

Note: You must set the robot's name to the value shown as "Room nickname" on the XMPP settings page.

There's no need to set config.robot.mention_name manually. The adapter will load the proper mention name from the XMPP roster upon connection.

Example

Lita.configure do |config|
  config.robot.name = "Lita Bot"
  config.robot.adapter = :hipchat
  config.adapters.hipchat.jid = "12345_123456@chat.hipchat.com"
  config.adapters.hipchat.password = "secret"
  config.adapters.hipchat.debug = true
  config.adapters.hipchat.rooms = :all
end

Events

Managing rooms

To make Lita join or part from rooms, use the built-in join and part commands. For backwards compatibility, the rooms configuration attribute will be supported until lita-hipchat 4.0, but you should remove it and begin using the new command instead. If the configuration attribute is set, lita-hipchat will honor its value and join those rooms instead of the ones persisted to Redis from using the new commands.

NOTE: You must be a member of the config.robot.admins to use the build in join and part commands**

License

MIT