projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change response format of /api/pleroma/emoji to the one that actually makes sense
[akkoma]
/
lib
/
pleroma
/
web
/
streamer.ex
diff --git
a/lib/pleroma/web/streamer.ex
b/lib/pleroma/web/streamer.ex
index a04ee1b6ebf934815b9ba3c4540c6dc50aef1671..a82109f92078947a8c2fc459634dbd1d05deeeda 100644
(file)
--- a/
lib/pleroma/web/streamer.ex
+++ b/
lib/pleroma/web/streamer.ex
@@
-8,11
+8,10
@@
defmodule Pleroma.Web.Streamer do
alias Pleroma.Activity
alias Pleroma.Notification
alias Pleroma.Object
alias Pleroma.Activity
alias Pleroma.Notification
alias Pleroma.Object
- alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.User
+ alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.MastodonAPI.NotificationView
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.MastodonAPI.NotificationView
- alias Pleroma.Web.ActivityPub.ActivityPub
@keepalive_interval :timer.seconds(30)
@keepalive_interval :timer.seconds(30)
@@
-82,7
+81,7
@@
defmodule Pleroma.Web.Streamer do
_ ->
Pleroma.List.get_lists_from_activity(item)
|> Enum.filter(fn list ->
_ ->
Pleroma.List.get_lists_from_activity(item)
|> Enum.filter(fn list ->
- owner =
Repo.get(User,
list.user_id)
+ owner =
User.get_by_id(
list.user_id)
Visibility.visible_for_user?(item, owner)
end)
Visibility.visible_for_user?(item, owner)
end)
@@
-200,12
+199,13
@@
defmodule Pleroma.Web.Streamer do
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
mutes = user.info.mutes || []
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
mutes = user.info.mutes || []
+ reblog_mutes = user.info.muted_reblogs || []
- parent = Object.normalize(item
.data["object"]
)
+ parent = Object.normalize(item)
unless is_nil(parent) or item.actor in blocks or item.actor in mutes or
unless is_nil(parent) or item.actor in blocks or item.actor in mutes or
-
not ActivityPub.contain_activity(item, user) or parent.data["actor"] in blocks
or
- parent.data["actor"] in mutes do
+
item.actor in reblog_mutes or 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
send(socket.transport_pid, {:text, represent_update(item, user)})
end
else