projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'email-stub-in-verify-credentials' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
api_spec
/
operations
/
chat_operation.ex
diff --git
a/lib/pleroma/web/api_spec/operations/chat_operation.ex
b/lib/pleroma/web/api_spec/operations/chat_operation.ex
index cf299bfc264a39cbe05ed9fc554095bf1b7a45ad..e5ee6e695c510f53517a024cff5e7016fad66379 100644
(file)
--- a/
lib/pleroma/web/api_spec/operations/chat_operation.ex
+++ b/
lib/pleroma/web/api_spec/operations/chat_operation.ex
@@
-1,11
+1,12
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.ChatOperation do
alias OpenApiSpex.Operation
alias OpenApiSpex.Schema
alias Pleroma.Web.ApiSpec.Schemas.ApiError
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ApiSpec.ChatOperation do
alias OpenApiSpex.Operation
alias OpenApiSpex.Schema
alias Pleroma.Web.ApiSpec.Schemas.ApiError
+ alias Pleroma.Web.ApiSpec.Schemas.BooleanLike
alias Pleroma.Web.ApiSpec.Schemas.Chat
alias Pleroma.Web.ApiSpec.Schemas.ChatMessage
alias Pleroma.Web.ApiSpec.Schemas.Chat
alias Pleroma.Web.ApiSpec.Schemas.ChatMessage
@@
-132,7
+133,10
@@
defmodule Pleroma.Web.ApiSpec.ChatOperation do
tags: ["chat"],
summary: "Get a list of chats that you participated in",
operationId: "ChatController.index",
tags: ["chat"],
summary: "Get a list of chats that you participated in",
operationId: "ChatController.index",
- parameters: pagination_params(),
+ parameters: [
+ Operation.parameter(:with_muted, :query, BooleanLike, "Include chats from muted users")
+ | pagination_params()
+ ],
responses: %{
200 => Operation.response("The chats of the user", "application/json", chats_response())
},
responses: %{
200 => Operation.response("The chats of the user", "application/json", chats_response())
},
@@
-158,7
+162,8
@@
defmodule Pleroma.Web.ApiSpec.ChatOperation do
"The messages in the chat",
"application/json",
chat_messages_response()
"The messages in the chat",
"application/json",
chat_messages_response()
- )
+ ),
+ 404 => Operation.response("Not Found", "application/json", ApiError)
},
security: [
%{
},
security: [
%{
@@
-184,7
+189,8
@@
defmodule Pleroma.Web.ApiSpec.ChatOperation do
"application/json",
ChatMessage
),
"application/json",
ChatMessage
),
- 400 => Operation.response("Bad Request", "application/json", ApiError)
+ 400 => Operation.response("Bad Request", "application/json", ApiError),
+ 422 => Operation.response("MRF Rejection", "application/json", ApiError)
},
security: [
%{
},
security: [
%{
@@
-230,7
+236,7
@@
defmodule Pleroma.Web.ApiSpec.ChatOperation do
"account" => %{
"pleroma" => %{
"is_admin" => false,
"account" => %{
"pleroma" => %{
"is_admin" => false,
- "
confirmation_pending" => fals
e,
+ "
is_confirmed" => tru
e,
"hide_followers_count" => false,
"is_moderator" => false,
"hide_favorites" => true,
"hide_followers_count" => false,
"is_moderator" => false,
"hide_favorites" => true,
@@
-300,11
+306,11
@@
defmodule Pleroma.Web.ApiSpec.ChatOperation do
"content" => "Check this out :firefox:",
"id" => "13",
"chat_id" => "1",
"content" => "Check this out :firefox:",
"id" => "13",
"chat_id" => "1",
- "ac
tor
_id" => "someflakeid",
+ "ac
count
_id" => "someflakeid",
"unread" => false
},
%{
"unread" => false
},
%{
- "ac
tor
_id" => "someflakeid",
+ "ac
count
_id" => "someflakeid",
"content" => "Whats' up?",
"id" => "12",
"chat_id" => "1",
"content" => "Whats' up?",
"id" => "12",
"chat_id" => "1",