diff --git a/lib/discourse_chat/provider/flowdock/flowdock_provider.rb b/lib/discourse_chat/provider/flowdock/flowdock_provider.rb index 677fe7a..d6e031c 100644 --- a/lib/discourse_chat/provider/flowdock/flowdock_provider.rb +++ b/lib/discourse_chat/provider/flowdock/flowdock_provider.rb @@ -18,7 +18,7 @@ module DiscourseChat::Provider::FlowdockProvider req.body = message.to_json response = http.request(req) - return response + response end def self.generate_flowdock_message(post, flow_token) @@ -45,7 +45,7 @@ module DiscourseChat::Provider::FlowdockProvider } } - return message + message end def self.trigger_notification(post, channel) diff --git a/lib/discourse_chat/provider/matrix/matrix_provider.rb b/lib/discourse_chat/provider/matrix/matrix_provider.rb index 291869b..05e7595 100644 --- a/lib/discourse_chat/provider/matrix/matrix_provider.rb +++ b/lib/discourse_chat/provider/matrix/matrix_provider.rb @@ -28,7 +28,7 @@ module DiscourseChat req.body = message.to_json response = http.request(req) - return response + response end def self.generate_matrix_message(post) @@ -53,7 +53,7 @@ module DiscourseChat } - return message + message end def self.trigger_notification(post, channel) diff --git a/lib/discourse_chat/provider/mattermost/mattermost_command_controller.rb b/lib/discourse_chat/provider/mattermost/mattermost_command_controller.rb index 78ccb8b..d16c821 100644 --- a/lib/discourse_chat/provider/mattermost/mattermost_command_controller.rb +++ b/lib/discourse_chat/provider/mattermost/mattermost_command_controller.rb @@ -43,7 +43,7 @@ module DiscourseChat::Provider::MattermostProvider # Create channel if doesn't exist channel ||= DiscourseChat::Channel.create!(provider: provider, data: { identifier: channel_id }) - return ::DiscourseChat::Helper.process_command(channel, tokens) + ::DiscourseChat::Helper.process_command(channel, tokens) end diff --git a/lib/discourse_chat/provider/rocketchat/rocketchat_provider.rb b/lib/discourse_chat/provider/rocketchat/rocketchat_provider.rb index 82a3e6c..f35219e 100644 --- a/lib/discourse_chat/provider/rocketchat/rocketchat_provider.rb +++ b/lib/discourse_chat/provider/rocketchat/rocketchat_provider.rb @@ -44,7 +44,7 @@ module DiscourseChat::Provider::RocketchatProvider message[:attachments].push(summary) - return message + message end def self.send_via_webhook(message) diff --git a/lib/discourse_chat/provider/slack/slack_command_controller.rb b/lib/discourse_chat/provider/slack/slack_command_controller.rb index 4fc905a..fddb341 100644 --- a/lib/discourse_chat/provider/slack/slack_command_controller.rb +++ b/lib/discourse_chat/provider/slack/slack_command_controller.rb @@ -100,7 +100,7 @@ module DiscourseChat::Provider::SlackProvider response = http.request(req) end - return { text: I18n.t("chat_integration.provider.slack.transcript.loading") } + { text: I18n.t("chat_integration.provider.slack.transcript.loading") } end def interactive diff --git a/lib/discourse_chat/provider/slack/slack_provider.rb b/lib/discourse_chat/provider/slack/slack_provider.rb index 82f5f5a..802f477 100644 --- a/lib/discourse_chat/provider/slack/slack_provider.rb +++ b/lib/discourse_chat/provider/slack/slack_provider.rb @@ -70,7 +70,7 @@ module DiscourseChat::Provider::SlackProvider message[:attachments].push(summary) - return message + message end def self.send_via_api(post, channel, message) diff --git a/lib/discourse_chat/provider/telegram/telegram_command_controller.rb b/lib/discourse_chat/provider/telegram/telegram_command_controller.rb index faef0c7..27b5344 100644 --- a/lib/discourse_chat/provider/telegram/telegram_command_controller.rb +++ b/lib/discourse_chat/provider/telegram/telegram_command_controller.rb @@ -80,7 +80,7 @@ module DiscourseChat::Provider::TelegramProvider tokens[0][0] = '' # Remove the slash from the first token tokens[0] = tokens[0].split('@')[0] # Remove the bot name from the command (necessary for group chats) - return ::DiscourseChat::Helper.process_command(channel, tokens) + ::DiscourseChat::Helper.process_command(channel, tokens) end def telegram_token_valid? diff --git a/lib/discourse_chat/provider/telegram/telegram_provider.rb b/lib/discourse_chat/provider/telegram/telegram_provider.rb index 32a0fc6..6071fec 100644 --- a/lib/discourse_chat/provider/telegram/telegram_provider.rb +++ b/lib/discourse_chat/provider/telegram/telegram_provider.rb @@ -29,7 +29,7 @@ module DiscourseChat end def self.sendMessage(message) - return self.do_api_request('sendMessage', message) + self.do_api_request('sendMessage', message) end def self.do_api_request(methodName, message) @@ -46,7 +46,7 @@ module DiscourseChat responseData = JSON.parse(response.body) - return responseData + responseData end def self.message_text(post) @@ -69,7 +69,7 @@ module DiscourseChat tags = topic.tags.map(&:name).join(', ') end - return I18n.t( + I18n.t( "chat_integration.provider.telegram.message", user: display_name, post_url: post.full_url, diff --git a/lib/discourse_chat/provider/zulip/zulip_provider.rb b/lib/discourse_chat/provider/zulip/zulip_provider.rb index 95515f5..1141807 100644 --- a/lib/discourse_chat/provider/zulip/zulip_provider.rb +++ b/lib/discourse_chat/provider/zulip/zulip_provider.rb @@ -22,7 +22,7 @@ module DiscourseChat response = http.request(req) - return response + response end def self.generate_zulip_message(post, stream, subject)