aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/api_spec/operations/chat_operation.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/api_spec/operations/chat_operation.ex')
-rw-r--r--lib/pleroma/web/api_spec/operations/chat_operation.ex22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/pleroma/web/api_spec/operations/chat_operation.ex b/lib/pleroma/web/api_spec/operations/chat_operation.ex
index e8b5eff1f..0fe0e07b2 100644
--- a/lib/pleroma/web/api_spec/operations/chat_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/chat_operation.ex
@@ -16,6 +16,28 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
apply(__MODULE__, operation, [])
end
+ def mark_as_read_operation do
+ %Operation{
+ tags: ["chat"],
+ summary: "Mark all messages in the chat as read",
+ operationId: "ChatController.mark_as_read",
+ parameters: [Operation.parameter(:id, :path, :string, "The ID of the Chat")],
+ responses: %{
+ 200 =>
+ Operation.response(
+ "The updated chat",
+ "application/json",
+ Chat
+ )
+ },
+ security: [
+ %{
+ "oAuth" => ["write"]
+ }
+ ]
+ }
+ end
+
def create_operation do
%Operation{
tags: ["chat"],