mirror of https://github.com/zulip/zulip.git
api-docs: Add ModernPresenceFormat schema.
This commit is contained in:
parent
22fcf6cede
commit
d66ee33859
|
@ -9173,34 +9173,8 @@ paths:
|
|||
additionalProperties:
|
||||
$ref: "#/components/schemas/LegacyPresenceFormat"
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
active_timestamp:
|
||||
type: integer
|
||||
description: |
|
||||
The UNIX timestamp of the last time a client connected
|
||||
to Zulip reported that the user was actually present
|
||||
(e.g. via focusing a browser window or interacting
|
||||
with a computer running the desktop app).
|
||||
|
||||
Clients should display users with a current
|
||||
`active_timestamp` as fully present.
|
||||
idle_timestamp:
|
||||
type: integer
|
||||
description: |
|
||||
The UNIX timestamp of the last time the user had a
|
||||
client connected to Zulip, including idle clients
|
||||
where the user hasn't interacted with the system
|
||||
recently.
|
||||
|
||||
The Zulip server has no way of distinguishing whether
|
||||
an idle web app user is at their computer, but hasn't
|
||||
interacted with the Zulip tab recently, or simply left
|
||||
their desktop computer on when they left.
|
||||
|
||||
Thus, clients should display users with a current
|
||||
`idle_timestamp` but no current `active_timestamp` as
|
||||
potentially present.
|
||||
additionalProperties:
|
||||
$ref: "#/components/schemas/ModernPresenceFormat"
|
||||
example:
|
||||
{
|
||||
"msg": "",
|
||||
|
@ -21441,6 +21415,39 @@ components:
|
|||
type: string
|
||||
description: |
|
||||
The type of the message: `"stream"` or `"private"`.
|
||||
ModernPresenceFormat:
|
||||
type: object
|
||||
description: |
|
||||
`{user_id}`: Presence data (modern format) for the user with
|
||||
the specified ID.
|
||||
additionalProperties: false
|
||||
properties:
|
||||
active_timestamp:
|
||||
type: integer
|
||||
description: |
|
||||
The UNIX timestamp of the last time a client connected
|
||||
to Zulip reported that the user was actually present
|
||||
(e.g. via focusing a browser window or interacting
|
||||
with a computer running the desktop app).
|
||||
|
||||
Clients should display users with a current
|
||||
`active_timestamp` as fully present.
|
||||
idle_timestamp:
|
||||
type: integer
|
||||
description: |
|
||||
The UNIX timestamp of the last time the user had a
|
||||
client connected to Zulip, including idle clients
|
||||
where the user hasn't interacted with the system
|
||||
recently.
|
||||
|
||||
The Zulip server has no way of distinguishing whether
|
||||
an idle web app user is at their computer, but hasn't
|
||||
interacted with the Zulip tab recently, or simply left
|
||||
their desktop computer on when they left.
|
||||
|
||||
Thus, clients should display users with a current
|
||||
`idle_timestamp` but no current `active_timestamp` as
|
||||
potentially present.
|
||||
LegacyPresenceFormat:
|
||||
type: object
|
||||
description: |
|
||||
|
|
Loading…
Reference in New Issue