projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Revert "Add remote follow pages.""
[akkoma]
/
lib
/
pleroma
/
web
/
twitter_api
/
representers
/
object_representer.ex
diff --git
a/lib/pleroma/web/twitter_api/representers/object_representer.ex
b/lib/pleroma/web/twitter_api/representers/object_representer.ex
index 57ab24caa4f2632b472602063402d17182af7b7c..69eaeb36c3d9c60aeb790e5547de70ef558df155 100644
(file)
--- a/
lib/pleroma/web/twitter_api/representers/object_representer.ex
+++ b/
lib/pleroma/web/twitter_api/representers/object_representer.ex
@@
-6,10
+6,15
@@
defmodule Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter do
data = object.data
url = List.first(data["url"])
%{
data = object.data
url = List.first(data["url"])
%{
- url: url["href"],
+ url: url["href"]
|> Pleroma.Web.MediaProxy.url()
,
mimetype: url["mediaType"],
mimetype: url["mediaType"],
- id:
object.id
,
+ id:
data["uuid"]
,
oembed: false
}
end
oembed: false
}
end
+
+ # If we only get the naked data, wrap in an object
+ def to_map(%{} = data, opts) do
+ to_map(%Object{data: data}, opts)
+ end
end
end