summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKukovskii Vladimir <ura@dgtakano.co.jp>2018-07-03 21:01:56 +0900
committerKukovskii Vladimir <ura@dgtakano.co.jp>2018-07-14 20:45:53 +0900
commit5b3a9d6bc20b2526483964187454b8c998b20360 (patch)
tree24724671f34fec3e64187c40fc7e9c1c113f3922
parentd63a0a07f4ac80c1a3f801fd8087762847b4a018 (diff)
downloadgitlab-ce-5b3a9d6bc20b2526483964187454b8c998b20360.tar.gz
Fix fetch_attachment_title method of Hangouts Chat service
-rw-r--r--app/models/project_services/hangouts_chat_service.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/project_services/hangouts_chat_service.rb b/app/models/project_services/hangouts_chat_service.rb
index 00e9b634dd1..53f11c424e3 100644
--- a/app/models/project_services/hangouts_chat_service.rb
+++ b/app/models/project_services/hangouts_chat_service.rb
@@ -58,8 +58,7 @@ class HangoutsChatService < ChatNotificationService
end
def fetch_attachment_title(attachment)
- return nil if attachment[:title].nil?
- return attachment[:title] if attachment[:title_link].nil?
+ return attachment[:title] unless attachment[:title_link]
"<#{attachment[:title_link]}|#{attachment[:title]}>"
end