External url if available, id if not.
%{
id: activity.id,
uri: object["id"],
- url: object["external_url"],
+ url: object["external_url"] || object["id"],
account: AccountView.render("account.json", %{user: user}),
in_reply_to_id: reply_to && reply_to.id,
in_reply_to_account_id: reply_to_user && reply_to_user.id,
expected = %{
id: note.id,
uri: note.data["object"]["id"],
- url: note.data["object"]["external_id"],
+ url: note.data["object"]["id"],
account: AccountView.render("account.json", %{user: user}),
in_reply_to_id: nil,
in_reply_to_account_id: nil,