Remote Timeline: add Streaming support

This commit is contained in:
Alex Gleason 2020-10-08 20:01:48 -05:00
commit 9c672ecbb5
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
7 changed files with 51 additions and 1 deletions

View file

@ -29,6 +29,14 @@ defmodule Pleroma.Web.StreamerTest do
assert {:ok, "public:local:media"} = Streamer.get_topic("public:local:media", nil, nil)
end
test "allows instance streams" do
assert {:ok, "public:remote:lain.com"} =
Streamer.get_topic("public:remote", nil, nil, %{"instance" => "lain.com"})
assert {:ok, "public:remote:media:lain.com"} =
Streamer.get_topic("public:remote:media", nil, nil, %{"instance" => "lain.com"})
end
test "allows hashtag streams" do
assert {:ok, "hashtag:cofe"} = Streamer.get_topic("hashtag", nil, nil, %{"tag" => "cofe"})
end