Merge branch 'features/column_media_streaming' into 'develop'
Add streaming to media tabs of federated and local TLs See merge request pleroma/pleroma!225
This commit is contained in:
commit
90cf75f4a7
@ -65,6 +65,14 @@ def stream_out(activity) do
|
|||||||
if activity.local do
|
if activity.local do
|
||||||
Pleroma.Web.Streamer.stream("public:local", activity)
|
Pleroma.Web.Streamer.stream("public:local", activity)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if activity.data["object"]["attachment"] != [] do
|
||||||
|
Pleroma.Web.Streamer.stream("public:media", activity)
|
||||||
|
|
||||||
|
if activity.local do
|
||||||
|
Pleroma.Web.Streamer.stream("public:local:media", activity)
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if !Enum.member?(activity.data["cc"] || [], public) &&
|
if !Enum.member?(activity.data["cc"] || [], public) &&
|
||||||
!Enum.member?(
|
!Enum.member?(
|
||||||
|
@ -15,8 +15,16 @@ def connect(params, socket) do
|
|||||||
with token when not is_nil(token) <- params["access_token"],
|
with token when not is_nil(token) <- params["access_token"],
|
||||||
%Token{user_id: user_id} <- Repo.get_by(Token, token: token),
|
%Token{user_id: user_id} <- Repo.get_by(Token, token: token),
|
||||||
%User{} = user <- Repo.get(User, user_id),
|
%User{} = user <- Repo.get(User, user_id),
|
||||||
stream when stream in ["public", "public:local", "user", "direct", "list"] <-
|
stream
|
||||||
params["stream"] do
|
when stream in [
|
||||||
|
"public",
|
||||||
|
"public:local",
|
||||||
|
"public:media",
|
||||||
|
"public:local:media",
|
||||||
|
"user",
|
||||||
|
"direct",
|
||||||
|
"list"
|
||||||
|
] <- params["stream"] do
|
||||||
topic = if stream == "list", do: "list:#{params["list"]}", else: stream
|
topic = if stream == "list", do: "list:#{params["list"]}", else: stream
|
||||||
|
|
||||||
socket =
|
socket =
|
||||||
|
Loading…
Reference in New Issue
Block a user