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
Support Slack Replies by allowing use of thread_timestamp #1033
Support Slack Replies by allowing use of thread_timestamp #1033
Conversation
… we will make it so that every channel can independently have a thread to reply too adds default value for ts_thread, fixing testcases removes print
removes unused code
043f01c
to
86d7b04
Compare
adds changes from PR removes Walrus Operator for Dockerbuild compatibility
86d7b04
to
a95bd48
Compare
pushed changes for Walrus operator removal, as it was conflicting with the Docker build. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1033 +/- ##
==========================================
- Coverage 99.27% 99.27% -0.01%
==========================================
Files 136 135 -1
Lines 17669 17563 -106
Branches 3603 3585 -18
==========================================
- Hits 17541 17435 -106
Misses 119 119
Partials 9 9 ☔ View full report in Codecov by Sentry. |
That was fast! I'll review tomorrow 🚀🙂 |
I pushed a few changes to your code to handle some edge cases. Can you have a Also, i'm curious if you could share/provide steps on how one can get the timestamp from Slack so that they can provide it into Apprise. Is it in the URL, or something they can copy and paste out of the message thread? |
Just double checked, and seems the Regular expression is not matching on the to answer your question, the slack api gives back a It is also accessible on the slack frontend with some inspect element - slack uses the timestamp as the div's ID attribute |
Pushed a change to the regex that suits the naming schema a bit better - please verify if any adjustments are needed :) |
re adds match
7355263
to
92bde91
Compare
Looks good! Great work! 🚀 |
Description:
This enhancement allows Slack notification plugin to accept timestamps of messages that it should reply too.
This allows Apprise to reply into multiple channel's messages, creating a chat thread for relevant notifications.
Syntax
Thread Timestamp (defined as
{thread_ts}
below can be added to defined elements using a colon:
delimiter like so:slack://{tokenA}/{tokenB}/{tokenC}/#{channel}:{thread_ts}
slack://{tokenA}/{tokenB}/{tokenC}/#{channel1}:{thread_ts}/#{channel2}:{thread_ts}/#{channelN}:{thread_ts}
slack://{botname}@{tokenA}/{tokenB}/{tokenC}/+{encoded_id}:{thread_ts}
slack://{botname}@{tokenA}/{tokenB}/{tokenC}/+{encoded_id1}:{thread_ts}/+{encoded_id2}:{thread_ts}/+{encoded_id3}:{thread_ts}
slack://{botname}@{tokenA}/{tokenB}/{tokenC}/@{user_id}:{thread_ts}
slack://{botname}@{tokenA}/{tokenB}/{tokenC}/@{user_id1}:{thread_ts}/@{user_id2}:{thread_ts}/@{user_id3}:{thread_ts}
New Service Completion Status
Not Applicable
Checklist
flake8
)Testing
Anyone can help test this source code as follows: