Streamer: Don't filter out announce notifications.
This commit is contained in:
parent
c2a052a346
commit
cf56655614
2 changed files with 25 additions and 4 deletions
|
|
@ -128,6 +128,23 @@ defmodule Pleroma.Web.StreamerTest do
|
|||
assert Streamer.filtered_by_user?(user, announce)
|
||||
end
|
||||
|
||||
test "it does stream notifications announces of the user's own posts in the 'user' stream", %{
|
||||
user: user
|
||||
} do
|
||||
Streamer.get_topic_and_add_socket("user", user)
|
||||
|
||||
other_user = insert(:user)
|
||||
{:ok, activity} = CommonAPI.post(user, %{status: "hey"})
|
||||
{:ok, announce} = CommonAPI.repeat(activity.id, other_user)
|
||||
|
||||
notification =
|
||||
Pleroma.Notification
|
||||
|> Repo.get_by(%{user_id: user.id, activity_id: announce.id})
|
||||
|> Repo.preload(:activity)
|
||||
|
||||
refute Streamer.filtered_by_user?(user, notification)
|
||||
end
|
||||
|
||||
test "it streams boosts of mastodon user in the 'user' stream", %{user: user} do
|
||||
Streamer.get_topic_and_add_socket("user", user)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue