[PR #5629/03039a56 backport][stable-6] Remove automatically adding # symbol to channel names #5641
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 is a backport of PR #5629 as merged into main (03039a5).
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.