Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lita-hipchat

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lita-hipchat

  • 3.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

  • jid (String) - The JID of your robot's HipChat account. Default: nil.
  • password (String) - The password for your robot's HipChat account. Default: nil.

Optional attributes

  • server (String) - The HipChat Server address. Override this with the full domain of your server if using a private HipChat Server installation. Default: "chat.hipchat.com"
  • debug (Boolean) - If true, turns on the underlying Jabber library's (xmpp4r) logger, which is fairly verbose. Default: false.
  • DEPRECATED - rooms (Symbol, Array) - An array of room JIDs that Lita should join upon connection. Can also be the symbol :all, which will cause Lita to discover and join all rooms. Default: nil (no rooms).
  • muc_domain (String) - The XMPP Multi-User Chat domain to use. Default: "conf.hipchat.com".
  • ignore_unknown_users (Boolean) - Messages generated through HipChat's API which don't come from a real user account will be ignored by the robot. With the default setting of false, Lita will emit a warning but the message will be dispatched to any registered handlers as usual. Default: false.

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

  • :connected - When the robot has connected to HipChat. No payload.
  • :disconnected - When the robot has disconnected from HipChat. No payload.
  • :joined - When the robot joins a room. Payload: :room: The String room ID that was joined.
  • :parted - When the robot parts from a room. Payload: :room: The String room ID that was parted from.

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.

License

MIT

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc