This repository was archived by the owner on Aug 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 253
output can take a username as an arg #16
Merged
Roach
merged 9 commits into
slack-samples:master
from
aerickson:output_can_take_username
Feb 5, 2018
Merged
output can take a username as an arg #16
Roach
merged 9 commits into
slack-samples:master
from
aerickson:output_can_take_username
Feb 5, 2018
Conversation
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
f21e04c to
fda73db
Compare
rtmbot.py
Outdated
| message = output[1] | ||
| # things that start with U are users. convert to an IM channel. | ||
| if destination.startswith('U'): | ||
| result = json.loads(self.slack_client.api_call('im.open', user=destination)) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind doing a try/except to catch ValueError in case there's some incorrectly formatted JSON returned?
Contributor
|
This is a great idea! If you're still interested in this, mind rebasing and adding some tweaks? Looking forward to getting this in! |
fda73db to
84e4a1c
Compare
1 similar comment
1 similar comment
2 similar comments
Contributor
Author
|
@Yasumoto Sorry for the delay. I'm not exactly sure how the group messaging should work. Please let me know if you think of anything else. |
Roach
approved these changes
Feb 5, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Output entries starting with U will be converted to IM channels.
Please let me know if there's a better way to go about this.
Thanks,
Andy