projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1633470
)
TwitterAPI: support follow activities without published date.
author
lain
<lain@soykaf.club>
Mon, 19 Feb 2018 08:50:57 +0000
(09:50 +0100)
committer
lain
<lain@soykaf.club>
Mon, 19 Feb 2018 08:50:57 +0000
(09:50 +0100)
lib/pleroma/web/twitter_api/representers/activity_representer.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index f9f9bd7b4bee118988f08da10231219e330ef2b0..98be18c9895cdbbbd68bb076a2220b585c27d5c9 100644
(file)
--- a/
lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/
lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@
-56,7
+56,8
@@
defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
}
end
- def to_map(%Activity{data: %{"type" => "Follow", "published" => created_at, "object" => followed_id}} = activity, %{user: user} = opts) do
+ def to_map(%Activity{data: %{"type" => "Follow", "object" => followed_id}} = activity, %{user: user} = opts) do
+ created_at = activity.data["published"] || (DateTime.to_iso8601(activity.inserted_at))
created_at = created_at |> Utils.date_to_asctime
followed = User.get_cached_by_ap_id(followed_id)