mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Keep ostatus id as activity id.
This commit is contained in:
parent
a16da387d2
commit
8a0d2b33d8
2 changed files with 3 additions and 1 deletions
|
@ -63,6 +63,7 @@ defmodule Pleroma.Web.OStatus do
|
||||||
to = to ++ mentions
|
to = to ++ mentions
|
||||||
|
|
||||||
date = string_from_xpath("/entry/published", entry)
|
date = string_from_xpath("/entry/published", entry)
|
||||||
|
id = string_from_xpath("/entry/id", entry)
|
||||||
|
|
||||||
object = %{
|
object = %{
|
||||||
"type" => "Note",
|
"type" => "Note",
|
||||||
|
@ -81,7 +82,7 @@ defmodule Pleroma.Web.OStatus do
|
||||||
object
|
object
|
||||||
end
|
end
|
||||||
|
|
||||||
ActivityPub.create(to, actor, context, object, %{}, date)
|
ActivityPub.create(to, actor, context, object, %{"id" => id}, date)
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_or_make_user(uri) do
|
def find_or_make_user(uri) do
|
||||||
|
|
|
@ -7,6 +7,7 @@ defmodule Pleroma.Web.OStatusTest do
|
||||||
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
{:ok, [activity]} = OStatus.handle_incoming(incoming)
|
||||||
|
|
||||||
assert activity.data["type"] == "Create"
|
assert activity.data["type"] == "Create"
|
||||||
|
assert activity.data["id"] == "tag:gs.example.org:4040,2017-04-23:noticeId=29:objectType=note"
|
||||||
assert activity.data["object"]["type"] == "Note"
|
assert activity.data["object"]["type"] == "Note"
|
||||||
assert activity.data["published"] == "2017-04-23T14:51:03+00:00"
|
assert activity.data["published"] == "2017-04-23T14:51:03+00:00"
|
||||||
assert activity.data["context"] == "tag:gs.example.org:4040,2017-04-23:objectType=thread:nonce=f09e22f58abd5c7b"
|
assert activity.data["context"] == "tag:gs.example.org:4040,2017-04-23:objectType=thread:nonce=f09e22f58abd5c7b"
|
||||||
|
|
Loading…
Reference in a new issue