Get fresh objects on changes.
This will count retweets / favs correctly again.
This commit is contained in:
parent
71362acb93
commit
e12a6d5666
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ defmodule Pleroma.Web.OStatus do
|
||||||
|
|
||||||
def make_share(entry, doc, retweeted_activity) do
|
def make_share(entry, doc, retweeted_activity) do
|
||||||
with {:ok, actor} <- find_make_or_update_user(doc),
|
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),
|
id when not is_nil(id) <- string_from_xpath("/entry/id", entry),
|
||||||
{:ok, activity, _object} = ActivityPub.announce(actor, object, id, false) do
|
{:ok, activity, _object} = ActivityPub.announce(actor, object, id, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
|
@ -70,7 +70,7 @@ defmodule Pleroma.Web.OStatus do
|
||||||
|
|
||||||
def make_favorite(entry, doc, favorited_activity) do
|
def make_favorite(entry, doc, favorited_activity) do
|
||||||
with {:ok, actor} <- find_make_or_update_user(doc),
|
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),
|
id when not is_nil(id) <- string_from_xpath("/entry/id", entry),
|
||||||
{:ok, activity, _object} = ActivityPub.like(actor, object, id, false) do
|
{:ok, activity, _object} = ActivityPub.like(actor, object, id, false) do
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
|
|
Loading…
Reference in a new issue