Skip to content
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

Slack Button Fix and Threaded Messaging #6020

Merged
merged 48 commits into from
Jul 27, 2020
Merged

Slack Button Fix and Threaded Messaging #6020

merged 48 commits into from
Jul 27, 2020

Conversation

b-quachtran
Copy link
Contributor

@b-quachtran b-quachtran commented Jun 12, 2020

Proposed changes:

  • Bug fix for reported issue with buttons in Slack connector ( Closes Issue in the Slack connector #5704 )
  • Added optional configuration for message threading in Slack connector. When set to True via the credentials file, bot responses will appear as a threaded message in Slack.
  • Doc update describing how to use threaded Slack configuration
  • Doc update with example usage of Rasa custom response payload with Slack API.

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

Copy link
Contributor

@chkoss chkoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, great to see this new feature! 🥳

rasa/core/channels/slack.py Outdated Show resolved Hide resolved
rasa/core/channels/slack.py Outdated Show resolved Hide resolved
rasa/core/channels/slack.py Show resolved Hide resolved
tests/core/test_channels.py Show resolved Hide resolved
rasa/core/channels/slack.py Outdated Show resolved Hide resolved
tests/core/test_channels.py Outdated Show resolved Hide resolved
tests/core/test_channels.py Outdated Show resolved Hide resolved
@akelad
Copy link
Contributor

akelad commented Jul 13, 2020

oh i didn't mean to rush you i was just checking whether ella had checked with you, thank you very much!

b-quachtran and others added 5 commits July 15, 2020 16:22
Co-authored-by: Christina Koß <c.koss@rasa.com>
Co-authored-by: Christina Koß <c.koss@rasa.com>
Co-authored-by: Christina Koß <c.koss@rasa.com>
@akelad
Copy link
Contributor

akelad commented Jul 16, 2020

@b-quachtran let me know when you're ready for me to take another look at this

@b-quachtran
Copy link
Contributor Author

@akelad Yep, just finished pushing some changes if you can take a look.

@b-quachtran b-quachtran requested a review from akelad July 16, 2020 15:56
Copy link
Contributor

@akelad akelad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made according to christinas review look good, but i had a few more questions sorry!

rasa/core/channels/slack.py Outdated Show resolved Hide resolved
rasa/core/channels/slack.py Show resolved Hide resolved
rasa/core/channels/slack.py Show resolved Hide resolved
Copy link
Contributor

@chkoss chkoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I added a couple more small comments in addition to what Akela said.

rasa/core/channels/slack.py Outdated Show resolved Hide resolved
rasa/constants.py Outdated Show resolved Hide resolved
b-quachtran and others added 2 commits July 27, 2020 08:28
@b-quachtran b-quachtran requested a review from akelad July 27, 2020 16:12
@akelad
Copy link
Contributor

akelad commented Jul 27, 2020

looks good to me, Christina already approved so you don't need a second approval. But some build stages seem to be failing.. once those are fixed feel free to add the ready to merge label @b-quachtran

@rasabot rasabot merged commit 6634a4c into master Jul 27, 2020
@rasabot rasabot deleted the slack-enhancements branch July 27, 2020 21:56
@@ -297,13 +316,18 @@ async def process_message(

if metadata is not None:
output_channel = metadata.get("out_channel")
if self.use_threads:
thread_id = metadata.get("ts")
Copy link
Contributor

@chkoss chkoss Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@b-quachtran This line confuses me - shouldn't it be metadata.get("thread_id") now? If I'm not mistaken, can you create a PR with a quick fix?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then we should probably also extend the tests to include a case that would have caught this (e.g. a test where we get a message event, post a reply to the same thread, and assert that everything went as expected).
If you have time, this could go into the PR with the fix, otherwise let's just create an issue to add such a test.

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.

Issue in the Slack connector
6 participants