Poll server for Mattermost
Go Makefile
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
cmd/matterpoll-emoji Move main file to cmd/ (#99) Jan 7, 2018
poll Update dependencies (#106) Jul 8, 2018
testdata Add flag to specify path to config, update config to support binding … Aug 24, 2017
vendor Update dependencies (#106) Jul 8, 2018
.config.json Add flag to specify path to config, update config to support binding … Aug 24, 2017
.gitignore
.travis.yml start support Go 1.10 (#104) Feb 24, 2018
CHANGELOG.md Prepare 0.1.1 release (#96) Jan 6, 2018
CONTRIBUTING.md Add flag to specify path to config, update config to support binding … Aug 24, 2017
Gopkg.lock Update dependencies (#106) Jul 8, 2018
Gopkg.toml Update dependencies (#106) Jul 8, 2018
LICENSE Create LICENSE Mar 13, 2017
Makefile Update makefile for dep 0.4 (#101) Jan 25, 2018
README.md Remove https from `go get` (#102) Feb 20, 2018
matterpoll-emoji.png update image Apr 3, 2017

README.md

matterpoll-emoji

Build Status Code Coverage Go Report Card Releases

Polling feature for Mattermost's custom slash command.

Requirements

Setup Guide

Setup Mattermost

Create a Custom Slash Command from Integration > Slash Commands > Add Slash Command.

  • DisplayName - Matterpoll
  • Description - Polling feature by https://github.com/kaakaa/matterpoll-emoji
  • Command Trigger Word - poll
  • Request URL - http://localhost:8505/poll
  • Request Method - POST
  • Response Username - Leave this empty
  • Response Icon - Leave this empty
  • Autocomplete - Enable this
  • Autocomplete Hint - [Question] [Option1] [Option2]...
  • Autocomplete Description - Start a poll

Copy the Token from your newly created slash command

Caution: If you run matterpoll-emoji on same host as Mattermost server, you have to add localhost to Allow untrusted internal connections to option.

Setup server

Run pre compiled release

Download the latest version at https://github.com/kaakaa/matterpoll-emoji/releases/latest. Decompress it and change parameter in config.json as you need them

{
  "host": "http://mattermost.example.com:8065",  // The URL of your Mattermost server
  "listen": "localhost:8505",  // The address:port to listen on
  "token": "9jrxak1ykxrmnaed9cps9i4cim",  // The Token created my Mattermost
  "user": {
   "id": "bot",          // The username of an existing Mattermost account
   "password": "botbot"  // The password of an existing Mattermost account
 }
}

Run the server

./matterpoll-emoji

Compile the source my yourself

Clone this repository and checkout the latest release. You can just use the master branch but it can be unstable.

go get -u github.com/kaakaa/matterpoll-emoji
cd $GOPATH/src/github.com/kaakaa/matterpoll-emoji
git checkout $(git describe --tags)

Copy the default config

cp .config.json config.json

Change parameter in config.json as you need them

{
  "host": "http://mattermost.example.com:8065",  // The URL of your Mattermost server
  "listen": "localhost:8505",  // The address:port to listen on
  "token": "9jrxak1ykxrmnaed9cps9i4cim",  // The Token created my Mattermost
  "user": {
   "id": "bot",          // The username of an existing Mattermost account
   "password": "botbot"  // The password of an existing Mattermost account
 }
}

Run the server

make run

Usage

Typing this on Mattermost

/poll `What do you gys wanna grab for lunch?` :pizza: :sushi: :fried_shrimp: :spaghetti: :apple:

then posting poll comment

screen_shot

You can use " or ' instead of `

License