Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8a0d2b33
Commit
8a0d2b33
authored
Apr 30, 2017
by
lain
Browse files
Keep ostatus id as activity id.
parent
a16da387
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/ostatus/ostatus.ex
View file @
8a0d2b33
...
...
@@ -63,6 +63,7 @@ def handle_note(entry, doc \\ nil) do
to
=
to
++
mentions
date
=
string_from_xpath
(
"/entry/published"
,
entry
)
id
=
string_from_xpath
(
"/entry/id"
,
entry
)
object
=
%{
"type"
=>
"Note"
,
...
...
@@ -81,7 +82,7 @@ def handle_note(entry, doc \\ nil) do
object
end
ActivityPub
.
create
(
to
,
actor
,
context
,
object
,
%{},
date
)
ActivityPub
.
create
(
to
,
actor
,
context
,
object
,
%{
"id"
=>
id
},
date
)
end
def
find_or_make_user
(
uri
)
do
...
...
test/web/ostatus/ostatus_test.exs
View file @
8a0d2b33
...
...
@@ -7,6 +7,7 @@ test "handle incoming note - GS, Salmon" do
{
:ok
,
[
activity
]}
=
OStatus
.
handle_incoming
(
incoming
)
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
[
"published"
]
==
"2017-04-23T14:51:03+00:00"
assert
activity
.
data
[
"context"
]
==
"tag:gs.example.org:4040,2017-04-23:objectType=thread:nonce=f09e22f58abd5c7b"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment