From: Roger Braun Date: Tue, 9 May 2017 16:11:11 +0000 (+0200) Subject: Get fresh objects on changes. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e12a6d5666e26a98fbb8918cbf68e800cddd2bb4;p=akkoma Get fresh objects on changes. This will count retweets / favs correctly again. --- diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index 8c1da0920..55d600ab2 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -51,7 +51,7 @@ defmodule Pleroma.Web.OStatus do def make_share(entry, doc, retweeted_activity) do with {:ok, actor} <- find_make_or_update_user(doc), - %Object{} = object <- Object.get_cached_by_ap_id(retweeted_activity.data["object"]["id"]), + %Object{} = object <- Object.get_by_ap_id(retweeted_activity.data["object"]["id"]), id when not is_nil(id) <- string_from_xpath("/entry/id", entry), {:ok, activity, _object} = ActivityPub.announce(actor, object, id, false) do {:ok, activity} @@ -70,7 +70,7 @@ defmodule Pleroma.Web.OStatus do def make_favorite(entry, doc, favorited_activity) do with {:ok, actor} <- find_make_or_update_user(doc), - %Object{} = object <- Object.get_cached_by_ap_id(favorited_activity.data["object"]["id"]), + %Object{} = object <- Object.get_by_ap_id(favorited_activity.data["object"]["id"]), id when not is_nil(id) <- string_from_xpath("/entry/id", entry), {:ok, activity, _object} = ActivityPub.like(actor, object, id, false) do {:ok, activity}