Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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"
}

About

Lita handler for parsing Envoy visitor notification message

Resources

License

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages