Skip to content

feat(methods): add entity.presentComments method example - #433

Draft
zimeg wants to merge 1 commit into
mainfrom
zimeg-feat-entity-examples-present-comments
Draft

zimeg wants to merge 1 commit into
mainfrom
zimeg-feat-entity-examples-present-comments

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds a method example for entity.presentComments in methods/src/entity/entity-present-comments.js, and lists it in methods/README.md.

  • The payload is the example on the reference page, with its comments kept as code comments.
  • Three changes from that example, since the API rejects it as written: the comment IDs are shortened to comment-unique-id-001 and comment-unique-id-002 (an id is at most 25 characters), the external reply user's icon gets the alt_text the sender example uses (the API requires it), and error: "" is left out (the API expects an object with a status).

This is part 1 of 2 in the entity examples stack (batch B9 work object comments), in the order a live test runs them: present comments, then acknowledge an action on one. Each pull request builds on the one before it and merges on its own, bottom to top. The stack starts on main.

  1. feat(methods): add entity.presentComments method example #433 entity.presentComments 👈 this pull request
  2. feat(methods): add entity.acknowledgeCommentAction method example #432 entity.acknowledgeCommentAction

Dependency

This depends on slackapi/node-slack-sdk#2869, which adds entity.presentComments to @slack/web-api. It hasn't been released yet, so npm run check fails until a release ships it and methods/package.json pins that version. The example type-checks and runs against a local build of that branch.

Testing

  1. cd methods/src/entity && slack install --environment local, then export SLACK_TOKEN=... with the app's bot token.
  2. slack run entity-present-comments.js and confirm the response. The example trigger_id returns invalid_trigger_id. Use one from an entity_comments_requested event to see the comments in a Work Object flexpane.

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg changed the base branch from zimeg-feat-entity-examples-acknowledge-comment-action to main November 18, 2026 06:22
@zimeg
zimeg force-pushed the zimeg-feat-entity-examples-present-comments branch from a80714a to c439f93 Compare November 18, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant