Commit 77fb926a authored by kaniini's avatar kaniini

Merge branch 'nicer-share-urls' into 'develop'

Add some nicer urls in status view.

See merge request pleroma/pleroma!844
parents dff5e1e4 59c27f29
......@@ -144,10 +144,17 @@ def render("status.json", %{activity: %{data: %{"object" => object}} = activity}
card = render("card.json", Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity))
url =
if user.local do
Pleroma.Web.Router.Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, activity)
object["external_url"] || object["id"]
id: to_string(,
uri: object["id"],
url: object["external_url"] || object["id"],
url: url,
account: AccountView.render("account.json", %{user: user}),
in_reply_to_id: reply_to && to_string(,
in_reply_to_account_id: reply_to_user && to_string(,
......@@ -81,7 +81,7 @@ test "a note activity" do
expected = %{
id: to_string(,
url: Pleroma.Web.Router.Helpers.o_status_url(Pleroma.Web.Endpoint, :notice, note),
account: AccountView.render("account.json", %{user: user}),
in_reply_to_id: nil,
in_reply_to_account_id: nil,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment