Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pleroma
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
379
Issues
379
List
Boards
Labels
Service Desk
Milestones
Merge Requests
56
Merge Requests
56
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pleroma
pleroma
Commits
a3c37379
Commit
a3c37379
authored
Jul 30, 2020
by
lain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatMessage schema: Add preview cards.
parent
781b2708
Pipeline
#29236
passed with stages
in 15 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
lib/pleroma/web/api_spec/schemas/chat_message.ex
lib/pleroma/web/api_spec/schemas/chat_message.ex
+34
-1
No files found.
lib/pleroma/web/api_spec/schemas/chat_message.ex
View file @
a3c37379
...
...
@@ -19,13 +19,46 @@ defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessage do
content:
%
Schema
{
type:
:string
,
nullable:
true
},
created_at:
%
Schema
{
type:
:string
,
format:
:"date-time"
},
emojis:
%
Schema
{
type:
:array
},
attachment:
%
Schema
{
type:
:object
,
nullable:
true
}
attachment:
%
Schema
{
type:
:object
,
nullable:
true
},
card:
%
Schema
{
type:
:object
,
nullable:
true
,
description:
"Preview card for links included within status content"
,
required:
[
:url
,
:title
,
:description
,
:type
],
properties:
%{
type:
%
Schema
{
type:
:string
,
enum:
[
"link"
,
"photo"
,
"video"
,
"rich"
],
description:
"The type of the preview card"
},
provider_name:
%
Schema
{
type:
:string
,
nullable:
true
,
description:
"The provider of the original resource"
},
provider_url:
%
Schema
{
type:
:string
,
format:
:uri
,
description:
"A link to the provider of the original resource"
},
url:
%
Schema
{
type:
:string
,
format:
:uri
,
description:
"Location of linked resource"
},
image:
%
Schema
{
type:
:string
,
nullable:
true
,
format:
:uri
,
description:
"Preview thumbnail"
},
title:
%
Schema
{
type:
:string
,
description:
"Title of linked resource"
},
description:
%
Schema
{
type:
:string
,
description:
"Description of preview"
}
}
}
},
example:
%{
"account_id"
=>
"someflakeid"
,
"chat_id"
=>
"1"
,
"content"
=>
"hey you again"
,
"created_at"
=>
"2020-04-21T15:06:45.000Z"
,
"card"
=>
nil
,
"emojis"
=>
[
%{
"static_url"
=>
"https://dontbulling.me/emoji/Firefox.gif"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment