Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

api-docs: Add ModernPresenceFormat schema.

Lauryn Menardd66ee33859fb
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index a66b148c1b5..fafb34ddb69 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -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: |