ChatMessages: Add attachments.
This commit is contained in:
parent
205313e541
commit
20baa2eaf0
14 changed files with 237 additions and 24 deletions
|
|
@ -236,7 +236,8 @@ defmodule Pleroma.Web.ApiSpec.ChatOperation do
|
|||
description: "POST body for creating an chat message",
|
||||
type: :object,
|
||||
properties: %{
|
||||
content: %Schema{type: :string, description: "The content of your message"}
|
||||
content: %Schema{type: :string, description: "The content of your message"},
|
||||
media_id: %Schema{type: :string, description: "The id of an upload"}
|
||||
},
|
||||
required: [:content],
|
||||
example: %{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessage do
|
|||
chat_id: %Schema{type: :string},
|
||||
content: %Schema{type: :string},
|
||||
created_at: %Schema{type: :string, format: :"date-time"},
|
||||
emojis: %Schema{type: :array}
|
||||
emojis: %Schema{type: :array},
|
||||
attachment: %Schema{type: :object, nullable: true}
|
||||
},
|
||||
example: %{
|
||||
"account_id" => "someflakeid",
|
||||
|
|
@ -32,7 +33,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessage do
|
|||
"url" => "https://dontbulling.me/emoji/Firefox.gif"
|
||||
}
|
||||
],
|
||||
"id" => "14"
|
||||
"id" => "14",
|
||||
"attachment" => nil
|
||||
}
|
||||
})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue