8000 Making thread and ephemeral enhancements by mikegrima · Pull Request #70 · Netflix/hubcommander · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Making thread and ephemeral enhancements #70

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

Merged
merged 1 commit into from
Oct 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth_plugins/duo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup(self, secrets, **kwargs):

def authenticate(self, data, user_data, **kwargs):
send_info(data["channel"], "🎟 @{}: Sending a Duo notification to your device. You must approve!"
.format(user_data["name"]), markdown=True)
.format(user_data["name"]), markdown=True, ephemeral_user=user_data["id"])

try:
result = self._perform_auth(user_data)
Expand Down Expand Up @@ -68,7 +68,7 @@ def authenticate(self, data, user_data, **kwargs):

# All Good:
send_success(data["channel"], "🎸 @{}: Duo approved! Completing request..."
.format(user_data["name"]), markdown=True)
.format(user_data["name"]), markdown=True, ephemeral_user=user_data["id"])
return True

def _perform_auth(self, user_data):
Expand Down
5 changes: 3 additions & 2 deletions bot_components/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,16 @@ def decorated_command(plugin_obj, data, user_data):
args = vars(parser.parse_args(split_args))

except SystemExit as _:
send_info(data["channel"], format_help_text(data, user_data, **kwargs), markdown=True)
send_info(data["channel"], format_help_text(data, user_data, **kwargs), markdown=True,
ephemeral_user=user_data["id"])
return

# Perform additional verification:
try:
args = perform_additional_verification(plugin_obj, args, **kwargs)
except ParseException as pe:
send_error(data["channel"], pe.format_proper_usage(user_data["name"]),
markdown=True)
markdown=True, ephemeral_user=user_data["id"])
return
except Exception as e:
send_error(data["channel"], "An exception was encountered while running validation for the input. "
Expand Down
1 change: 0 additions & 1 deletion bot_components/slack_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def send_raw(channel, text, ephemeral_user=None, thread=None):
:param thread:
:return:
"""

say(channel, None, text, ephemeral_user=ephemeral_user, thread=thread)


Expand Down
Loading
0