Use signed integer as attachment id.
authorRoger Braun <roger@rogerbraun.net>
Tue, 12 Sep 2017 09:43:36 +0000 (11:43 +0200)
committerRoger Braun <roger@rogerbraun.net>
Tue, 12 Sep 2017 09:43:36 +0000 (11:43 +0200)
lib/pleroma/web/mastodon_api/views/status_view.ex

index bf9862419c0a5ebc29f66127aabb037011aa9735..895ab3d507fbccdee61255454c895dab40df3442 100644 (file)
@@ -61,7 +61,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       true -> "unknown"
     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,