- Pleroma.Web.MastodonAPI.MastodonAPIController.render_notification(
- socket.assigns["user"],
- item
- )
+ NotificationView.render("show.json", %{
+ notification: item,
+ for: socket.assigns["user"]
+ })
if socket.assigns[:user] do
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
if socket.assigns[:user] do
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
- unless is_nil(parent) or item.actor in blocks or parent.data["actor"] in blocks do
+ unless is_nil(parent) or item.actor in blocks or item.actor in mutes or
+ 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
- def push_to_socket(topics, topic, %Activity{id: id, data: %{"type" => "Delete"}}) do
+ def push_to_socket(topics, topic, %Activity{
+ data: %{"type" => "Delete", "deleted_activity_id" => deleted_activity_id}
+ }) do
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.
if socket.assigns[:user] do
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
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.
if socket.assigns[:user] do
user = User.get_cached_by_ap_id(socket.assigns[:user].ap_id)
blocks = user.info.blocks || []
send(socket.transport_pid, {:text, represent_update(item, user)})
end
else
send(socket.transport_pid, {:text, represent_update(item, user)})
end
else