GithubHelp home page GithubHelp logo

isabella232 / mattermost-interactive-post-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattermost/mattermost-interactive-post-demo

0.0 0.0 0.0 3 KB

Interactive post demo for Mattermost

Python 100.00%

mattermost-interactive-post-demo's Introduction

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.

mattermost-interactive-post-demo's People

Contributors

ccbrown avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.