mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-27 19:09:12 +00:00
Use hash of attachment url as id.
Pretty hacky, let's see if we can get away with this.
This commit is contained in:
parent
44a650235b
commit
b58b35bf56
|
@ -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,
|
||||
|
|
|
@ -65,7 +65,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
}
|
||||
|
||||
expected = %{
|
||||
id: 6,
|
||||
id: 1638338801,
|
||||
type: "image",
|
||||
url: "someurl",
|
||||
remote_url: "someurl",
|
||||
|
|
Loading…
Reference in a new issue