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
ece86567
Commit
ece86567
authored
Nov 20, 2018
by
kaniini
Browse files
streamer: fix fetching the user's block list
parent
3356c7d1
Pipeline
#4599
failed with stages
in 7 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/streamer.ex
View file @
ece86567
...
...
@@ -173,7 +173,7 @@ def push_to_socket(topics, topic, %Activity{data: %{"type" => "Announce"}} = ite
Enum
.
each
(
topics
[
topic
]
||
[],
fn
socket
->
# Get the current user so we have up-to-date blocks etc.
user
=
User
.
get_cached_by_ap_id
(
socket
.
assigns
[
:user
]
.
ap_id
)
blocks
=
user
.
info
[
"
blocks
"
]
||
[]
blocks
=
user
.
info
.
blocks
||
[]
parent
=
Object
.
normalize
(
item
.
data
[
"object"
])
...
...
@@ -187,7 +187,7 @@ def push_to_socket(topics, topic, item) do
Enum
.
each
(
topics
[
topic
]
||
[],
fn
socket
->
# Get the current user so we have up-to-date blocks etc.
user
=
User
.
get_cached_by_ap_id
(
socket
.
assigns
[
:user
]
.
ap_id
)
blocks
=
user
.
info
[
"
blocks
"
]
||
[]
blocks
=
user
.
info
.
blocks
||
[]
unless
item
.
actor
in
blocks
do
send
(
socket
.
transport_pid
,
{
:text
,
represent_update
(
item
,
user
)})
...
...
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