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

PSSlack threaded responses #232

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

joshcorr
Copy link

This PR is looking to add support for the feature requested in #228 for threaded responses from Poshbot with a slack backend.

Description

The quick work around is that there is a check inside the SendMessage function that $Response.OriginalMessage.RawMessage.thread_ts is present. This is ran inside the Slack Backend, but could probably be put into the Response class. This change will require that this change from PSSlack be merged. RamblingCookieMonster/PSSlack#119

Related Issue

#228

Motivation and Context

I was personally looking for a way to keep PoshBot messages threaded and didn't find any documentation for current support. I noticed the open issue, and thought it would be fun. This can help users cut down on noise in a channel without loosing the transparency of working with a bot.

How Has This Been Tested?

Setup a Test bot on a personal slack channel and tested threaded/Non threaded built-in, Giphy and XKCD plugin. Also tested in DMs as well. Tested various response types to ensure that text/card/url/file all respond as expected. Still having an issue with threaded file uploads.

Screenshots (if appropriate):

Previous non working state:
Any message to a thread is returned to the channel.
before

working state:
Keyword in thread is returned to thread. Keyword in Channel is returned to channel. Keyword in DM is only sent to DM
after

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@joshcorr
Copy link
Author

Did some more testing and was able to get the threading to work with files. I am now able to get all response types to thread.

filetest

@joshcorr joshcorr changed the title WIP: PSSlack threaded responses PSSlack threaded responses Jul 1, 2021
@joshcorr
Copy link
Author

joshcorr commented Jul 1, 2021

@devblackops Believe that this is ready to review and merge when you are ready.

@joshcorr joshcorr force-pushed the add-SlackMessageThreading branch from 841c5f2 to 0b05635 Compare July 16, 2021 01:29
@joshcorr
Copy link
Author

The Pipeline states that it is failing, but all of the pester tests are passing.

@devblackops devblackops self-requested a review August 12, 2021 06:48
@devblackops devblackops self-assigned this Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants