-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove automatically adding # symbol to channel names #5629
Remove automatically adding # symbol to channel names #5629
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Could you please add a changelog fragment? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. I've added a first comment. Could you please add a changelog fragment? Thanks.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Felix Fontein <felix@fontein.de>
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
…id.yml Co-authored-by: Felix Fontein <felix@fontein.de>
changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Felix Fontein <felix@fontein.de>
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #5641 🤖 @patchback |
* Add regex to match all channel ids * Add changelog fragment * Allow matching of channel ids with 9-11 characters * Fix file name * Update changelogs/fragments/5629-add-channel-prefix-regex.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Remove channel auto prepend # * Update changelog fragment * Add prepend_hash option * Add version_added to prepend_hash doc string Co-authored-by: Felix Fontein <felix@fontein.de> * Add description of possible values for the prepend_hash option Co-authored-by: Felix Fontein <felix@fontein.de> * Remove old channel assign statement * Update changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelog fragment tag Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 03039a5)
@wmcbroomd2d thanks for improving the module! |
…symbol to channel names (#5641) Remove automatically adding # symbol to channel names (#5629) * Add regex to match all channel ids * Add changelog fragment * Allow matching of channel ids with 9-11 characters * Fix file name * Update changelogs/fragments/5629-add-channel-prefix-regex.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Remove channel auto prepend # * Update changelog fragment * Add prepend_hash option * Add version_added to prepend_hash doc string Co-authored-by: Felix Fontein <felix@fontein.de> * Add description of possible values for the prepend_hash option Co-authored-by: Felix Fontein <felix@fontein.de> * Remove old channel assign statement * Update changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelog fragment tag Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 03039a5) Co-authored-by: William McBroom <william.mcbroom@draft2digital.com>
SUMMARY
For channels with IDs that starts with G4 a # symbol is being prepended causing it to fail.
Channel IDs can start with either C, G, or D but there is no documentation on the length of the ID so it isn't possible to be able to create logic to catch all the possible IDs without false positives from channel name values.
This change removes the logic to automatically prepend # to passed in channel value.
Fixes issue #2608
https://api.slack.com/docs/conversations-api#shared_channels
ISSUE TYPE
COMPONENT NAME
slack
ADDITIONAL INFORMATION
When trying to edit a slack message in a private channel by using the message_id argument I get an error that the channel was not found with the Channel ID
G4xxxxxxx
build_payload_for_slack
is called there is an if which prepends # if channel_id does not starts with a certain symbols or does not have one of the listed two character prefixes. I've stumbled upon a channel which ID starts with G4 but current implementation doesn't have this string in the list so I got #G4xxxxxx added to payload.G4xxxxxxx
which is returned by previous task run.