diff options
author | Tusooa Zhu <tusooa@kazv.moe> | 2022-06-25 01:03:46 -0400 |
---|---|---|
committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-06-25 01:03:46 -0400 |
commit | 40953a8f5c299e55b3f186bd6fdebe1bbf6e7401 (patch) | |
tree | 21059f1e206266f9b5843881d09aeb13a714664c /lib | |
parent | 99a6f5031638da2eed237f91c6dded9e25717599 (diff) | |
download | pleroma-40953a8f5c299e55b3f186bd6fdebe1bbf6e7401.tar.gz pleroma-40953a8f5c299e55b3f186bd6fdebe1bbf6e7401.zip |
Reuse formerRepresentations from remote if possible
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/object/updater.ex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/object/updater.ex b/lib/pleroma/object/updater.ex index 03136c38e..0b21f6c99 100644 --- a/lib/pleroma/object/updater.ex +++ b/lib/pleroma/object/updater.ex @@ -67,7 +67,7 @@ defmodule Pleroma.Object.Updater do # Note that we may have got the edit history by first fetching the object {new_history, used_history_in_new_object?} = with true <- use_history_in_new_object?, - updated_history when not is_nil(updated_history) <- maybe_history(updated_object) do + updated_history when not is_nil(updated_history) <- maybe_history(opts[:new_data]) do {updated_history, true} else _ -> @@ -142,7 +142,11 @@ defmodule Pleroma.Object.Updater do %{updated_object: updated_data, used_history_in_new_object?: used_history_in_new_object?} = updated_data - |> maybe_update_history(original_data, updated: updated, use_history_in_new_object?: false) + |> maybe_update_history(original_data, + updated: updated, + use_history_in_new_object?: true, + new_data: new_data + ) updated_data = updated_data |