No commit activity in last 3 years
No release in over 3 years
Lita handler for parsing Envoy visitor notification message
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 3.0.0

Runtime

>= 4.3
 Project Readme

lita-visitor-notification-handler

Build Status

Lita handler for parsing Envoy visitor notification message and Envoy Deliveries messages

Installation

Add lita-visitor-notification-handler to your Lita instance's Gemfile:

gem "lita-visitor-notification-handler"

Configuration

To make this handler send a post request to your webhook, you can specify webhook_url

Lita.configure do |config|
  config.handlers.visitor_notification_handler.webhook_url = 'http://my-webhook.com'
end

Usage

This handler monitors private messages to it, when it sees Envoy visitor or Envoy Deliveries notification message, it parses it and reply the extracted data

For VR:

Envoy ッ:
Hello! John Doe is here without a specified host at the Envoy front desk.

Lita bot:
{"guest_name":"John Doe","location_name":"Envoy", "product": "vr"}

For Deliveries:

Envoy ッ:
You have a delivery from US Postal Service!

Lita bot:
{"delivery_id":"0939f462-2b2a-4e1e-aba0-bb7aafbff7d4","product": "deliveries"}

It also makes a post request callback to the webhook you provided, the body will be JSON in these formats

For VR:

{
    "host_name": "Host name",
    "guest_name": "Visitor name",
    "location_name": "Location name",
    "product": "vr"
}

For Deliveries:

{
    "delivery_id": "0939f462-2b2a-4e1e-aba0-bb7aafbff7d4",
    "product": "deliveries"
}