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
7db76a0f
Commit
7db76a0f
authored
May 06, 2017
by
lain
Browse files
Address incoming messages to followers.
parent
bda389d7
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/pleroma/web/ostatus/ostatus.ex
View file @
7db76a0f
...
...
@@ -143,7 +143,8 @@ def handle_note(entry, doc \\ nil) do
end
to
=
[
"https://www.w3.org/ns/activitystreams#Public"
"https://www.w3.org/ns/activitystreams#Public"
,
User
.
ap_followers
(
actor
)
]
mentions
=
:xmerl_xpath
.
string
(
'//link[@rel="mentioned" and @ostatus:object-type="http://activitystrea.ms/schema/1.0/person"]'
,
entry
)
...
...
test/web/ostatus/ostatus_test.exs
View file @
7db76a0f
...
...
@@ -2,7 +2,7 @@ defmodule Pleroma.Web.OStatusTest do
use
Pleroma
.
DataCase
alias
Pleroma
.
Web
.
OStatus
alias
Pleroma
.
Web
.
XML
alias
Pleroma
.
{
Object
,
Repo
}
alias
Pleroma
.
{
Object
,
Repo
,
User
}
import
Pleroma
.
Factory
test
"don't insert create notes twice"
do
...
...
@@ -32,6 +32,8 @@ test "handle incoming notes - GS, subscription" do
assert
activity
.
data
[
"object"
][
"type"
]
==
"Note"
assert
activity
.
data
[
"object"
][
"actor"
]
==
"https://social.heldscal.la/user/23211"
assert
activity
.
data
[
"object"
][
"content"
]
==
"Will it blend?"
user
=
User
.
get_cached_by_ap_id
(
activity
.
data
[
"actor"
])
assert
User
.
ap_followers
(
user
)
in
activity
.
data
[
"to"
]
end
test
"handle incoming notes with attachments - GS, subscription"
do
...
...
Write
Preview
Markdown
is supported
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