Skip to content

Commit

Permalink
Merge pull request #477 from artsy/joeyAghion/radiation
Browse files Browse the repository at this point in the history
chore: correct slack links to point to Impulse rather than Radiation
  • Loading branch information
joeyAghion authored Dec 14, 2023
2 parents 43f3ade + f04b347 commit c6abf05
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/apr/views/conversation_slack_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ defmodule Apr.Views.ConversationSlackView do
short: false
},
%{
title: "Radiation",
value: "#{radiation_conversation_link(event["properties"]["radiation_conversation_id"])}",
title: "Impulse",
value: "#{impulse_email_conversation_link(event["properties"]["radiation_conversation_id"])}",
short: false
}
]
Expand Down
10 changes: 3 additions & 7 deletions lib/apr/views/helpers/view_helper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ defmodule Apr.Views.Helper do
"<#{artist_link(artist_id)}|#{name}>"
end

def radiation_link(path) do
"https://radiation.artsy.net/#{path}"
end

def impulse_link(path) do
"https://impulse.artsy.net/#{path}"
end
Expand All @@ -66,9 +62,9 @@ defmodule Apr.Views.Helper do
"https://www.artsy.net/auction/#{path}"
end

def radiation_conversation_link(conversation_id) do
conversation_path = "admin/accounts/2/conversations/#{conversation_id}"
"<#{radiation_link(conversation_path)}|Conversation(#{conversation_id})>"
def impulse_email_conversation_link(email_conversation_id) do
email_conversation_path = "active_admin/email_conversations/#{email_conversation_id}"
"<#{impulse_link(email_conversation_path)}|EmailConversation(#{email_conversation_id})>"
end

def impulse_conversation_link(conversation_id) do
Expand Down
2 changes: 1 addition & 1 deletion lib/apr/views/radiation_message_slack_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Apr.Views.RadiationMessageSlackView do

def render(_subscription, event) do
%{
text: ":sadbot: #{event["verb"]} event for #{radiation_link(event["object"]["link"])}",
text: ":sadbot: #{event["verb"]} event for #{impulse_link(event["object"]["link"])}",
attachments: [
%{
fields: [
Expand Down

0 comments on commit c6abf05

Please sign in to comment.