summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/mattermost_helper.rb6
-rw-r--r--status_app.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/mattermost_helper.rb b/lib/mattermost_helper.rb
index 105c869..5c16663 100644
--- a/lib/mattermost_helper.rb
+++ b/lib/mattermost_helper.rb
@@ -42,7 +42,7 @@ module MattermostHelper # rubocop:disable Metrics/ModuleLength
data
end
- def mattermost_fetch_user_id(req)
+ def mattermost_fetch_user_data(req)
curl_cmd = mattermost_build_curl_cmd(req)
return nil unless curl_cmd
raw = mattermost_run_curl(curl_cmd)
@@ -62,7 +62,7 @@ module MattermostHelper # rubocop:disable Metrics/ModuleLength
else
req = '/users/email/' + @current_status['email']
end
- data = mattermost_fetch_user_id(req)
+ data = mattermost_fetch_user_data(req)
return nil unless data
update_status(data, @current_status['email'])
data['mattermost_uid']
@@ -207,7 +207,7 @@ module MattermostHelper # rubocop:disable Metrics/ModuleLength
output
end
- def update_details_from_mattermost(text, username)
+ def respond_to_mattermost_request(text, username)
data = parse_mattermost_text(text&.strip || '')
meth = "mattermost_command_#{data[0]}".to_sym
return { 'text' => text } unless respond_to?(meth)
diff --git a/status_app.rb b/status_app.rb
index b9a077a..09c42d7 100644
--- a/status_app.rb
+++ b/status_app.rb
@@ -115,7 +115,7 @@ class StatusApp < Sinatra::Base
end
output = { 'response_type' => 'ephemeral', 'text' => params[:text] }
output.merge!(
- update_details_from_mattermost(params[:text], params[:user_name])
+ respond_to_mattermost_request(params[:text], params[:user_name])
)
public_channel = @config.dig('mattermost', 'public_channel')
if public_channel && output['response_type'] == 'in_channel' \