projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Better error handling for user feeds."
[akkoma]
/
lib
/
pleroma
/
web
/
ostatus
/
activity_representer.ex
diff --git
a/lib/pleroma/web/ostatus/activity_representer.ex
b/lib/pleroma/web/ostatus/activity_representer.ex
index a129fac23c5a1b28e86f3bf00cbe766eca34293f..842e44ee4aa25dc909a5ca379dc4adaf753f35ca 100644
(file)
--- a/
lib/pleroma/web/ostatus/activity_representer.ex
+++ b/
lib/pleroma/web/ostatus/activity_representer.ex
@@
-1,10
+1,18
@@
defmodule Pleroma.Web.OStatus.ActivityRepresenter do
defmodule Pleroma.Web.OStatus.ActivityRepresenter do
- alias Pleroma.{Activity, User}
+ alias Pleroma.{Activity, User
, Object
}
alias Pleroma.Web.OStatus.UserRepresenter
require Logger
alias Pleroma.Web.OStatus.UserRepresenter
require Logger
+ defp get_href(id) do
+ with %Object{data: %{ "external_url" => external_url } }<- Object.get_cached_by_ap_id(id) do
+ external_url
+ else
+ _e -> id
+ end
+ end
+
defp get_in_reply_to(%{"object" => %{"inReplyTo" => in_reply_to}}) do
defp get_in_reply_to(%{"object" => %{"inReplyTo" => in_reply_to}}) do
- [{:"thr:in-reply-to", [ref: to_charlist(in_reply_to)], []}]
+ [{:"thr:in-reply-to", [ref: to_charlist(in_reply_to)
, href: to_charlist(get_href(in_reply_to))
], []}]
end
defp get_in_reply_to(_), do: []
end
defp get_in_reply_to(_), do: []