Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
normandy
pleroma
Commits
fe4c1d26
Commit
fe4c1d26
authored
6 years ago
by
Karen Konou
Browse files
Options
Downloads
Patches
Plain Diff
Add ActivityPub.contain_activity checks to streamer
parent
13c298d3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/pleroma/web/streamer.ex
+6
-2
6 additions, 2 deletions
lib/pleroma/web/streamer.ex
with
6 additions
and
2 deletions
lib/pleroma/web/streamer.ex
+
6
−
2
View file @
fe4c1d26
...
...
@@ -12,6 +12,7 @@ defmodule Pleroma.Web.Streamer do
alias
Pleroma
.
User
alias
Pleroma
.
Web
.
ActivityPub
.
Visibility
alias
Pleroma
.
Web
.
MastodonAPI
.
NotificationView
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
@keepalive_interval
:timer
.
seconds
(
30
)
...
...
@@ -203,7 +204,9 @@ defmodule Pleroma.Web.Streamer do
parent
=
Object
.
normalize
(
item
.
data
[
"object"
])
unless
is_nil
(
parent
)
or
item
.
actor
in
blocks
or
item
.
actor
in
mutes
or
parent
.
data
[
"actor"
]
in
blocks
or
parent
.
data
[
"actor"
]
in
mutes
do
not
ActivityPub
.
contain_activity
(
item
,
user
)
or
parent
.
data
[
"actor"
]
in
blocks
or
parent
.
data
[
"actor"
]
in
mutes
do
send
(
socket
.
transport_pid
,
{
:text
,
represent_update
(
item
,
user
)})
end
else
...
...
@@ -233,7 +236,8 @@ defmodule Pleroma.Web.Streamer do
blocks
=
user
.
info
.
blocks
||
[]
mutes
=
user
.
info
.
mutes
||
[]
unless
item
.
actor
in
blocks
or
item
.
actor
in
mutes
do
unless
item
.
actor
in
blocks
or
item
.
actor
in
mutes
or
not
ActivityPub
.
contain_activity
(
item
,
user
)
do
send
(
socket
.
transport_pid
,
{
:text
,
represent_update
(
item
,
user
)})
end
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment