summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 686ffd29d..bf9862419 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -61,8 +61,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
true -> "unknown"
end
+ << hash_id::32, _rest::binary >> = :crypto.hash(:md5, href)
+
%{
- id: attachment["uuid"],
+ id: attachment["id"] || hash_id,
url: href,
remote_url: href,
preview_url: href,