Skip to content

feat(bots): read subscribed channel history from slack - #1491

Merged
nixuuu merged 2 commits into
devfrom
feat/read-channel-messages
Nov 29, 2026
Merged

nixuuu merged 2 commits into
devfrom
feat/read-channel-messages

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

An owner can ask their bot in private chat for older Slack posts and thread replies, including messages posted before Canopy started listening. The gateway reads one page from Slack with the messaging account’s bot token. It checks the owner turn, account and subscription again before returning messages from the currently allowed authors.

The history tool returns readable text from supported Slack blocks and identifies attached files by ID and name. It skips system events such as channel joins. A rate limit carries the wait time from Slack. Membership and permission failures explain how to restore access. The existing Slack app manifest includes the required history scopes.

Verification

  • All 35 tests passed across bot-messenger-setup, bot-messenger-tools and slack-messenger with bun run check:tmp. Rechecked the history test after adding the unlabeled-link case. The fixtures covered pagination, replies, posts without fallback text, membership and scope errors, rate limiting, revocation during a read, disabled accounts and private-owner access.
  • Gateway typecheck, scoped lint, formatting and diff checks passed. Full repository checks run in CI. The Slack transport was tested against fixtures.

Copy audit

The existing saved-turn lookup shows “Checking message history”. The live read shows “Reading Slack messages” to identify the source. Before review, a Slack access error produced a generic platform failure. The new messages identify the account permission, channel membership or retry interval needed to proceed. Both statuses use the existing activity row. The remaining checklist items do not apply to this change.

@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 21:32
@nixuuu
nixuuu marked this pull request as draft November 29, 2026 21:36
auto-merge was automatically disabled November 29, 2026 21:36

Pull request was converted to draft

@nixuuu
nixuuu marked this pull request as ready for review November 29, 2026 21:39
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 21:39
@nixuuu
nixuuu merged commit 71ca185 into dev Nov 29, 2026
26 checks passed
@nixuuu
nixuuu deleted the feat/read-channel-messages branch November 29, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant