Stream follow updates
This commit is contained in:
parent
57d0379b89
commit
35ba48494f
30 changed files with 256 additions and 149 deletions
|
|
@ -74,6 +74,28 @@ defmodule Pleroma.Web.StreamerView do
|
|||
|> Jason.encode!()
|
||||
end
|
||||
|
||||
def render("relationships_update.json", item) do
|
||||
%{
|
||||
event: "pleroma:relationships_update",
|
||||
payload:
|
||||
%{
|
||||
state: item.state,
|
||||
follower: %{
|
||||
id: item.follower.id,
|
||||
follower_count: item.follower.follower_count,
|
||||
following_count: item.follower.following_count
|
||||
},
|
||||
following: %{
|
||||
id: item.following.id,
|
||||
follower_count: item.following.follower_count,
|
||||
following_count: item.following.following_count
|
||||
}
|
||||
}
|
||||
|> Jason.encode!()
|
||||
}
|
||||
|> Jason.encode!()
|
||||
end
|
||||
|
||||
def render("conversation.json", %Participation{} = participation) do
|
||||
%{
|
||||
event: "conversation",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue