1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 10:59:17 +00:00

Use signed integer as attachment id.

This commit is contained in:
Roger Braun 2017-09-12 11:43:36 +02:00
parent b58b35bf56
commit 7331733d30

View file

@ -61,7 +61,7 @@ def render("attachment.json", %{attachment: attachment}) do
true -> "unknown" true -> "unknown"
end end
<< hash_id::32, _rest::binary >> = :crypto.hash(:md5, href) << hash_id::signed-32, _rest::binary >> = :crypto.hash(:md5, href)
%{ %{
id: attachment["id"] || hash_id, id: attachment["id"] || hash_id,