docs: chat teasers are different

This commit is contained in:
Julian Lam
2026-02-13 12:29:05 -05:00
parent 0178e4fb7c
commit 91323dce55
3 changed files with 177 additions and 18 deletions

View File

@@ -1,14 +1,24 @@
TeaserObject: TeaserObject:
type: object type: object
nullable: true
properties: properties:
roomId: pid:
type: number type: number
fromuid: url:
type: number
content:
type: string type: string
uid:
type: number
description: A user identifier
timestamp: timestamp:
type: number type: number
tid:
type: number
description: A topic identifier
content:
type: string
sourceContent:
type: string
nullable: true
timestampISO: timestampISO:
type: string type: string
description: An ISO 8601 formatted date string (complementing `timestamp`) description: An ISO 8601 formatted date string (complementing `timestamp`)
@@ -18,15 +28,13 @@ TeaserObject:
uid: uid:
type: number type: number
description: A user identifier description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username: username:
type: string type: string
description: A friendly name for a given user account description: A friendly name for a given user account
displayname: displayname:
type: string type: string
description: This is either username or fullname depending on forum and user settings isLocal:
type: boolean
userslug: userslug:
type: string type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces description: An URL-safe variant of the username (i.e. lower-cased, spaces
@@ -34,10 +42,6 @@ TeaserObject:
picture: picture:
nullable: true nullable: true
type: string type: string
status:
type: string
lastonline:
type: number
icon:text: icon:text:
type: string type: string
description: A single-letter representation of a username. This is used in the description: A single-letter representation of a username. This is used in the
@@ -50,6 +54,10 @@ TeaserObject:
`icon:text` for the user's `icon:text` for the user's
auto-generated icon auto-generated icon
example: "#f44336" example: "#f44336"
lastonlineISO: topic:
type: string type: object
nullable: true additionalProperties: {}
index:
type: number
required:
- pid

View File

@@ -264,7 +264,60 @@ get:
unread: unread:
type: boolean type: boolean
teaser: teaser:
$ref: ../../../../components/schemas/TeaserObject.yaml#/TeaserObject type: object
properties:
roomId:
type: number
fromuid:
type: number
content:
type: string
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
user:
type: object
properties:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
displayname:
type: string
description: This is either username or fullname depending on forum and user settings
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
nullable: true
type: string
status:
type: string
lastonline:
type: number
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users
without an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's
auto-generated icon
example: "#f44336"
lastonlineISO:
type: string
nullable: true
lastUser: lastUser:
type: object type: object
properties: properties:
@@ -375,7 +428,58 @@ get:
unread: unread:
type: boolean type: boolean
teaser: teaser:
$ref: ../../../../components/schemas/TeaserObject.yaml#/TeaserObject type: object
properties:
fromuid:
type: number
content:
type: string
timestamp:
type: number
timestampISO:
type: string
description: An ISO 8601 formatted date string (complementing `timestamp`)
user:
type: object
properties:
uid:
type: number
description: A user identifier
isLocal:
type: boolean
description: Whether the user belongs to the local installation or not.
username:
type: string
description: A friendly name for a given user account
displayname:
type: string
description: This is either username or fullname depending on forum and user settings
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
nullable: true
type: string
status:
type: string
lastonline:
type: number
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users
without an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's
auto-generated icon
example: "#f44336"
lastonlineISO:
type: string
nullable: true
lastUser: lastUser:
type: object type: object
properties: properties:

View File

@@ -47,7 +47,54 @@ get:
type: boolean type: boolean
description: Whether or not the chat has unread messages within description: Whether or not the chat has unread messages within
teaser: teaser:
$ref: ../components/schemas/TeaserObject.yaml#/TeaserObject type: object
nullable: true
properties:
fromuid:
type: number
content:
type: string
timestamp:
type: number
timestampISO:
type: string
user:
type: object
properties:
uid:
type: number
description: A user identifier
username:
type: string
description: A friendly name for a given user account
displayname:
type: string
description: This is either username or fullname depending on forum and user settings
userslug:
type: string
description: An URL-safe variant of the username (i.e. lower-cased, spaces
removed, etc.)
picture:
nullable: true
type: string
status:
type: string
lastonline:
type: number
icon:text:
type: string
description: A single-letter representation of a username. This is used in the
auto-generated icon given to users
without an avatar
icon:bgColor:
type: string
description: A six-character hexadecimal colour code assigned to the user. This
value is used in conjunction with
`icon:text` for the user's
auto-generated icon
example: "#f44336"
lastonlineISO:
type: string
users: users:
type: array type: array
items: items: