Streamer: Fix wrong argument order when rendering activities to authenticated user
authorrinpatch <rinpatch@sdf.org>
Thu, 7 May 2020 13:13:24 +0000 (16:13 +0300)
committerrinpatch <rinpatch@sdf.org>
Thu, 7 May 2020 13:13:24 +0000 (16:13 +0300)
Closes #1747

lib/pleroma/web/mastodon_api/websocket_handler.ex
lib/pleroma/web/views/streamer_view.ex

index 6ef3fe2dd75460655ba7ee27c7d9598a0c512ba7..e2ffd02d0a606081d2f2269a921d41b2a113af3e 100644 (file)
@@ -78,7 +78,7 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do
     user = %User{} = User.get_cached_by_ap_id(state.user.ap_id)
 
     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
       {:ok, state}
     end
index 44386887851e820566af1d31256c57b22a28ff6b..237b29ded98ba4082ba6b49e22f7efb267400e42 100644 (file)
@@ -25,7 +25,7 @@ defmodule Pleroma.Web.StreamerView do
     |> Jason.encode!()
   end
 
-  def render("notification.json", %User{} = user, %Notification{} = notify) do
+  def render("notification.json", %Notification{} = notify, %User{} = user) do
     %{
       event: "notification",
       payload: