Decode URI sent in notification payloads
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
d1c31a5080
commit
691d71d9f7
@ -70,12 +70,13 @@ defmodule Mobilizon.Service.Activity.Renderer.Discussion do
|
||||
end
|
||||
|
||||
defp discussion_url(activity) do
|
||||
Routes.page_url(
|
||||
Endpoint,
|
||||
Endpoint
|
||||
|> Routes.page_url(
|
||||
:discussion,
|
||||
Actor.preferred_username_and_domain(activity.group),
|
||||
activity.subject_params["discussion_slug"]
|
||||
)
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
@ -71,11 +71,12 @@ defmodule Mobilizon.Service.Activity.Renderer.Event do
|
||||
end
|
||||
|
||||
defp event_url(activity) do
|
||||
Routes.page_url(
|
||||
Endpoint,
|
||||
Endpoint
|
||||
|> Routes.page_url(
|
||||
:event,
|
||||
activity.subject_params["event_uuid"]
|
||||
)
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
@ -50,7 +50,9 @@ defmodule Mobilizon.Service.Activity.Renderer.Group do
|
||||
end
|
||||
|
||||
defp post_url(activity) do
|
||||
Routes.page_url(Endpoint, :post, activity.subject_params["post_slug"])
|
||||
Endpoint
|
||||
|> Routes.page_url(:post, activity.subject_params["post_slug"])
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
@ -63,12 +63,13 @@ defmodule Mobilizon.Service.Activity.Renderer.Member do
|
||||
end
|
||||
|
||||
defp member_url(activity) do
|
||||
Routes.page_url(
|
||||
Endpoint,
|
||||
Endpoint
|
||||
|> Routes.page_url(
|
||||
:discussion,
|
||||
Actor.preferred_username_and_domain(activity.group),
|
||||
activity.subject_params["discussion_slug"]
|
||||
)
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
@ -70,12 +70,13 @@ defmodule Mobilizon.Service.Activity.Renderer.Post do
|
||||
end
|
||||
|
||||
defp discussion_url(activity) do
|
||||
Routes.page_url(
|
||||
Endpoint,
|
||||
Endpoint
|
||||
|> Routes.page_url(
|
||||
:discussion,
|
||||
Actor.preferred_username_and_domain(activity.group),
|
||||
activity.subject_params["discussion_slug"]
|
||||
)
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
@ -114,7 +114,9 @@ defmodule Mobilizon.Service.Activity.Renderer.Resource do
|
||||
end
|
||||
|
||||
defp resource_url(activity) do
|
||||
Routes.page_url(Endpoint, :resource, activity.subject_params["resource_uuid"])
|
||||
Endpoint
|
||||
|> Routes.page_url(:resource, activity.subject_params["resource_uuid"])
|
||||
|> URI.decode()
|
||||
end
|
||||
|
||||
defp profile(activity), do: Actor.display_name_and_username(activity.author)
|
||||
|
Loading…
Reference in New Issue
Block a user