From e12a6d5666e26a98fbb8918cbf68e800cddd2bb4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 9 May 2017 18:11:11 +0200 Subject: [PATCH] Get fresh objects on changes. This will count retweets / favs correctly again. --- lib/pleroma/web/ostatus/ostatus.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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} -- 2.45.2