Rubocop redundant return fix
This commit is contained in:
parent
bf6f66ada8
commit
6fcf381751
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ module DiscourseChat::Provider::RocketchatProvider
|
|||
|
||||
message[:attachments].push(summary)
|
||||
|
||||
return message
|
||||
message
|
||||
end
|
||||
|
||||
def self.send_via_webhook(message)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -70,7 +70,7 @@ module DiscourseChat::Provider::SlackProvider
|
|||
|
||||
message[:attachments].push(summary)
|
||||
|
||||
return message
|
||||
message
|
||||
end
|
||||
|
||||
def self.send_via_api(post, channel, message)
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -22,7 +22,7 @@ module DiscourseChat
|
|||
|
||||
response = http.request(req)
|
||||
|
||||
return response
|
||||
response
|
||||
end
|
||||
|
||||
def self.generate_zulip_message(post, stream, subject)
|
||||
|
|
Loading…
Reference in New Issue