Giter VIP home page Giter VIP logo

askia-slack-poll's People

Contributors

djedj avatar uncleserb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zenifold

askia-slack-poll's Issues

User-Friendly Error Messages

Sometimes there is an error when trying to create a poll, but the error message is cryptic. For example:

/askia failed with the error “dispatch_unknown_error”

--expires options does not work.

The --expires option does not work at the moment.
Steps to reproduce:

  1. Type /askia "What ya wanna drink on Friday?" Wine Beer Water --expires "1d 2h"
  2. Try to vote on any option.
  3. You will get (even though 1d didn't pass):

Poll error
The ability to vote to this poll has expired

This should be fixed by changing Line 134 in vote.js. At the moment the test returns always true (because the second part of the comparison just calculates poll.expires, a positive value). The right test seems to be date.getTime() < new Date.getTime() because the poll is expired when the expiration date lies in the past.

Allow Users to Delete a Poll

There doesn't seem to be a way to delete a poll, once it's been created, even as the author.

'Delete Message' doesn't appear in the context-menu, unlike for other types of messages.

not_authed error when credentials are passed in

I'm launching the application like this:

export SLACK_APP_OAUTH=xoxp-myoauth
export SLACK_APP_TOKEN=myapptoken
export PORT=443
export SSL_KEY=/path/to/privkey.pem
export SSL_CERT=/path/to/cert.pem
export SSL_CHAIN=/path/to/chain.pem
export SLACK_CLIENT_ID=myid
export SLACK_CLIENT_SECRET=mysecret
node index.js

and I'm receiving this error in the terminal when I attempt to run the slash command in Slack:

{ Error: An API error occurred: not_authed
    at Object.platformErrorFromResult (/root/repos/askia-slack-poll/node_modules/@slack/web-api/dist/errors.js:50:33)
    at WebClient.apiCall (/root/repos/askia-slack-poll/node_modules/@slack/web-api/dist/WebClient.js:374:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 'slack_webapi_platform_error',
  data:
   { ok: false,
     error: 'not_authed',
     response_metadata: { acceptedScopes: [Array] } } }

Am I missing something?

Hide poll results

Add an option to hide poll results to respondents and display them to the poll author only (either via DM or private inline message).

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.