Allow Channel.send_message to reply to a thread#162
Merged
Roach merged 1 commit intoslackapi:masterfrom Jan 23, 2017
Merged
Conversation
Current coverage is 64.16% (diff: 85.71%)@@ master #162 diff @@
==========================================
Files 9 9
Lines 289 293 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 189 188 -1
- Misses 100 105 +5
Partials 0 0
|
Contributor
|
@sd2k thanks Ben! would you mind updating the method reference in the docs real quick? https://github.com/slackapi/python-slackclient/blob/master/docs-src/real_time_messaging.rst |
Roach
reviewed
Jan 23, 2017
Contributor
Roach
left a comment
There was a problem hiding this comment.
Looks good!
Pending docs update
This makes it easier to meet Slack's Best Practices for bots (https://api.slack.com/docs/message-threading#best_practices) which states that they should reply to threaded messages in the same thread.
Contributor
Author
|
Thanks! I've updated the docs and actually noticed that I should have made the same changes to |
c-goosen
pushed a commit
to c-goosen/python-slackclient
that referenced
this pull request
Jun 18, 2019
This makes it easier to meet Slack's Best Practices for bots (https://api.slack.com/docs/message-threading#best_practices) which states that they should reply to threaded messages in the same thread.
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.
PR Summary
This PR adds two keyword arguments to
slackclient._channel.Channel.send_message:threadandreply_broadcast. These allow a message sent using this method to be marked as a reply to a thread, and optionally to be posted back to the channel.This makes it easier to meet Slack's Best Practices for bots (https://api.slack.com/docs/message-threading#best_practices) which states that they should reply to threaded messages in the same thread.
It also fixes the test for send_message by monkeypatching the server attribute, and adds an extra test for the new functionality.
Related Issues
None
Test strategy