Skip to content

Commit

Permalink
Update node to v20
Browse files Browse the repository at this point in the history
  • Loading branch information
kronosapiens committed Jun 9, 2024
1 parent 200694f commit a65ce7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"repository": "git@github.com:zaratanDotWorld/choreWheel.git",
"author": "Daniel Kronovet <krono@zaratan.world>",
"license": "AGPL-3.0-or-later",
"engines": {
"node": "^20.11.0",
"npm": "^10.8.1"
},
"scripts": {
"app:chores": "node src/bolt/chores.app.js",
"app:things": "node src/bolt/things.app.js",
Expand Down
2 changes: 2 additions & 0 deletions src/bolt/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ exports.updateVoteResults = async function (app, oauth, pollId) {
const body = await exports.getMessage(app, oauth, metadata.channel, metadata.ts);
const message = body.messages[0];

if (message === undefined) { throw new Error(`No message found for pollId ${pollId}`); }

// Parse current vote counts;
const voteBlock = message.blocks.length - 1;
const voteButtons = message.blocks[voteBlock].elements;
Expand Down

0 comments on commit a65ce7c

Please sign in to comment.