diff options
Diffstat (limited to 'lib/pleroma/web/twitter_api')
-rw-r--r-- | lib/pleroma/web/twitter_api/representers/user_representer.ex | 6 | ||||
-rw-r--r-- | lib/pleroma/web/twitter_api/twitter_api.ex | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/user_representer.ex b/lib/pleroma/web/twitter_api/representers/user_representer.ex index f358baf3c..ab7d6d353 100644 --- a/lib/pleroma/web/twitter_api/representers/user_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/user_representer.ex @@ -4,11 +4,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenter do alias Pleroma.User def to_map(user, opts) do - image = case user.avatar do - %{"url" => [%{"href" => href} | _]} -> href - _ -> "https://placehold.it/48x48" - end - + image = User.avatar_url(user) following = if opts[:for] do User.following?(opts[:for], user) else diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index 643305a11..f2b2b4418 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -66,7 +66,9 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do end with {:ok, activity} <- ActivityPub.insert(activity) do - add_conversation_id(activity) + {:ok, activity} = add_conversation_id(activity) + Pleroma.Web.Websub.publish(Pleroma.Web.OStatus.feed_path(user), user, activity) + {:ok, activity} end end |