- with_mock Pleroma.Web.Streamer, [],
- stream: fn _, payload ->
- case payload do
- {^author, cm_ref} ->
- assert cm_ref.unread == false
-
- {^recipient, cm_ref} ->
- assert cm_ref.unread == true
-
- view =
- Pleroma.Web.PleromaAPI.ChatView.render("show.json",
- last_message: cm_ref,
- chat: cm_ref.chat
- )
-
- assert view.unread == 1
-
- _ ->
- nil
- end
- end do
- {:ok, _create_activity, _meta} =
- SideEffects.handle(create_activity, local: false, object_data: chat_message_data)
+ {:ok, _create_activity, meta} =
+ SideEffects.handle(create_activity, local: false, object_data: chat_message_data)