Repository navigation
Feat/027 slack edit user messages - #73
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SlackService.updateUserMessage(event, text) replaces the text of a message a user wrote, in that user's name, so Slack shows it as edited. Slack lets only the author edit a message, so each user authorizes once through a module-owned OAuth v2 flow: - GET /slack/oauth/authorize redirects to Slack's dialog with the user scope chat:write only; a state cookie protects the callback. - GET /slack/oauth/callback exchanges the code and stores the token for the user Slack names in its answer, never for one named in the request. - Tokens are stored AES-256-GCM encrypted, bound to workspace and user, through the SlackUserTokenStore SPI (default: JDBC, table oe_spring_services.slack_user_tokens, no entity in core). - Without a token, SlackUserAuthorizationRequiredException carries the link. A token Slack rejects is removed; tokens_revoked removes it at once. - The edit is sent with blocks = [], so Slack displays the new text instead of the previous rich-text blocks. Opt-in via open-elements.slack.user-authorization.enabled; without the required properties the application starts with a warning and the feature refuses to work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pec 027) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combine the 2.1 upgrade guide: asynchronous webhook delivery and editing users' Slack messages as separate sections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…redException Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new optional feature to the
spring-services-slackmodule: the ability to edit users' Slack messages, in their name, after obtaining user authorization. The feature is off by default and requires explicit configuration, including a new database table for encrypted user tokens. The documentation has been updated to describe the setup, security, and behavior of this feature, including migration steps and configuration requirements. Additional improvements include clarifications on secrets management and updates to project structure documentation.New Feature: Editing Users' Slack Messages
chat:writescope) encrypted in the database. Includes a new OAuth authorization flow, endpoints, and database table (oe_spring_services.slack_user_tokens). [1] [2] [3]README.md, including sample listener code, configuration properties, and security considerations.docs/releases/upgrade-to-2.1.md, detailing migration steps, Slack app setup, and configuration.docs/specs/027-slack-edit-user-messages/behaviors.md.Documentation and Project Structure Updates
README.mdto reflect thatspring-services-slacknow supports both receiving and editing user messages.docs/TODO.mdwith deferred or open questions related to this feature, including token encryption key rotation, custom success pages, and editing the bot's own messages.