Merge branch 'fix/streamer-wrong-arg-order' into 'develop'
Streamer: Fix wrong argument order when rendering activities to authenticated user Closes #1747 See merge request pleroma/pleroma!2490
This commit is contained in:
commit
9f2bb22e15
2 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ def websocket_info({:render_with_user, view, template, item}, state) do
|
||||||
user = %User{} = User.get_cached_by_ap_id(state.user.ap_id)
|
user = %User{} = User.get_cached_by_ap_id(state.user.ap_id)
|
||||||
|
|
||||||
unless Streamer.filtered_by_user?(user, item) do
|
unless Streamer.filtered_by_user?(user, item) do
|
||||||
websocket_info({:text, view.render(template, user, item)}, %{state | user: user})
|
websocket_info({:text, view.render(template, item, user)}, %{state | user: user})
|
||||||
else
|
else
|
||||||
{:ok, state}
|
{:ok, state}
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,7 +25,7 @@ def render("update.json", %Activity{} = activity, %User{} = user) do
|
||||||
|> Jason.encode!()
|
|> Jason.encode!()
|
||||||
end
|
end
|
||||||
|
|
||||||
def render("notification.json", %User{} = user, %Notification{} = notify) do
|
def render("notification.json", %Notification{} = notify, %User{} = user) do
|
||||||
%{
|
%{
|
||||||
event: "notification",
|
event: "notification",
|
||||||
payload:
|
payload:
|
||||||
|
|
Loading…
Reference in a new issue