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
144dc048
Commit
144dc048
authored
Nov 08, 2018
by
kaniini
Browse files
user: only consider `to` recipients as mention targets
parent
a44d87f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/user.ex
View file @
144dc048
...
...
@@ -472,7 +472,7 @@ def get_notified_from_activity_query(to) do
)
end
def
get_notified_from_activity
(%
Activity
{
recipients:
to
,
data:
%{
"type"
=>
"Announce"
}
=
data
})
do
def
get_notified_from_activity
(%
Activity
{
data:
%{
"type"
=>
"Announce"
,
"to"
=>
to
}
=
data
})
do
object
=
Object
.
normalize
(
data
[
"object"
])
actor
=
User
.
get_cached_by_ap_id
(
data
[
"actor"
])
...
...
@@ -490,12 +490,14 @@ def get_notified_from_activity(%Activity{recipients: to, data: %{"type" => "Anno
Repo
.
all
(
query
)
end
def
get_notified_from_activity
(%
Activity
{
recipients:
to
})
do
def
get_notified_from_activity
(%
Activity
{
data:
%{
"to"
=>
to
}
})
do
query
=
get_notified_from_activity_query
(
to
)
Repo
.
all
(
query
)
end
def
get_notified_from_activity
(
_
),
do
:
[]
def
get_recipients_from_activity
(%
Activity
{
recipients:
to
})
do
query
=
from
(
...
...
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