Revert "Pleroma.Web.PleromaAPI.ChatController: Dialyzer error"

This reverts commit 8d64eedbec.
This commit is contained in:
Mark Felder 2024-01-30 14:15:05 -05:00
parent 589456f0ba
commit b709fc4dfe
2 changed files with 3 additions and 3 deletions

View file

@ -378,9 +378,9 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
title: "MarkAsReadRequest", title: "MarkAsReadRequest",
description: "POST body for marking a number of chat messages as read", description: "POST body for marking a number of chat messages as read",
type: :object, type: :object,
required: ["last_read_id"], required: [:last_read_id],
properties: %{ properties: %{
"last_read_id" => %Schema{ last_read_id: %Schema{
type: :string, type: :string,
description: "The content of your message." description: "The content of your message."
} }

View file

@ -120,7 +120,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
end end
def mark_as_read( def mark_as_read(
%{body_params: %{"last_read_id" => last_read_id}, assigns: %{user: user}} = conn, %{body_params: %{last_read_id: last_read_id}, assigns: %{user: user}} = conn,
%{id: id} %{id: id}
) do ) do
with {:ok, chat} <- Chat.get_by_user_and_id(user, id), with {:ok, chat} <- Chat.get_by_user_and_id(user, id),