Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

mattermost/mattermost-interactive-post-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interactive-post-demo

This is an interactive post demo for Mattermost. It adds a /poll command that allows you to create interactive "yes" or "no" polls:

Demo

Deploying

The slash command is designed to be deployed to AWS using the Serverless Framework:

  • Create an AWS account, install the AWS CLI, and configure your credentials via aws configure.
  • Install the Serverless Framework: npm install serverless -g
  • Install the serverless-python-requirements plugin for Serverless: npm install serverless-python-requirements
  • Deploy: serverless deploy -v

Once deployed, just use the slash-command URL in the output to create a custom command in Mattermost.

How it Works

When the slash command is triggered, a unique id is generated for the poll. The slash command then places a post in the channel with actions that contain the poll id in their context.

When a vote action is triggered, an entry is made in the database for the corresponding user and poll id, and an ephemeral message is returned to the user.

When the poll is ended, it counts all of the votes and replaces the message attachment's action buttons with the results.

About

Interactive post demo for Mattermost

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages