mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Update object correctly after setting context.
This commit is contained in:
parent
c83f279a7d
commit
7a47afed3c
2 changed files with 7 additions and 0 deletions
|
@ -204,6 +204,11 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
|> put_in(["object", "statusnetConversationId"], activity.id)
|
||||
|> put_in(["statusnetConversationId"], activity.id)
|
||||
|
||||
object = Object.get_by_ap_id(activity.data["object"]["id"])
|
||||
|
||||
changeset = Ecto.Changeset.change(object, data: data["object"])
|
||||
Repo.update(changeset)
|
||||
|
||||
changeset = Ecto.Changeset.change(activity, data: data)
|
||||
Repo.update(changeset)
|
||||
end
|
||||
|
|
|
@ -48,6 +48,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||
assert get_in(activity.data, ["statusnetConversationId"]) == activity.id
|
||||
|
||||
assert is_list(activity.data["object"]["attachment"])
|
||||
|
||||
assert activity.data["object"] == Object.get_by_ap_id(activity.data["object"]["id"]).data
|
||||
end
|
||||
|
||||
test "create a status that is a reply" do
|
||||
|
|
Loading…
Reference in a new issue