Skip to content

Commit c09b2f9

Browse files
committed
add redirect url to email body
1 parent eac6b28 commit c09b2f9

12 files changed

+26
-1
lines changed

lib/algora/activities/activities.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ defmodule Algora.Activities do
322322
"/a/#{slug}/#{activity.id}"
323323
end
324324

325+
def external_url(activity) do
326+
path = redirect_url_for_activity(activity)
327+
"#{AlgoraWeb.Endpoint.url()}/#{path}"
328+
end
329+
325330
def activity_type_to_name(type) do
326331
type
327332
|> to_string()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
<%= bounty.creator.display_name %> awarded you a Bounty for <% bounty.amount %>
2+
3+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
A Bounty for <%= bounty.amount %> was added to <%= bounty.ticket.repository.name %>
2+
3+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
A Bounty for <% bounty.ticket.repository.name %> had it's reward updated to <% bounty.amount %>
2+
3+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
A claim for <%= claim.bounty.amount %> was accepted for <%= claim.bounty.ticket.repository.name %>
22

33
<%= claim.url %>
4+
5+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
A claim for <%= claim.bounty.ticket.repository.name %> has been submitted
22

3-
<%= claim.url %>
3+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
A contract between <%= contract.client.display_name %> and <%= contract.contractor.display_name %> has been created.
2+
3+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
<%= Algora.Activities.external_url(activity) %>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
<%= Algora.Activities.external_url(activity) %>

0 commit comments

Comments
 (0)