diff --git a/zerver/lib/event_schema.py b/zerver/lib/event_schema.py index a8e9fa8069..0152c9f4e9 100644 --- a/zerver/lib/event_schema.py +++ b/zerver/lib/event_schema.py @@ -334,6 +334,7 @@ def check_heartbeat( _hotspot = DictType( required_keys=[ + ("type", str), ("name", str), ("title", str), ("description", str), diff --git a/zerver/lib/hotspots.py b/zerver/lib/hotspots.py index cf1ad7539e..0febb7ad7a 100644 --- a/zerver/lib/hotspots.py +++ b/zerver/lib/hotspots.py @@ -19,6 +19,7 @@ class Hotspot: def to_dict(self, delay: float = 0) -> Dict[str, Union[str, float, bool]]: return { + "type": "hotspot", "name": self.name, "title": str(self.title), "description": str(self.description), diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 56b876ff94..fc8ead919d 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -2298,6 +2298,7 @@ paths: "hotspots": [ { + "type": "hotspot", "name": "intro_streams", "title": "Catch up on a stream", "description": "Messages sent to a stream are seen by everyone subscribed to that stream. Try clicking on one of the stream links below.", @@ -18557,10 +18558,11 @@ components: description: | Dictionary containing details of a single hotspot. properties: - delay: - type: number + type: + type: string description: | - The delay after which the user should be shown the hotspot. + The type of the onboarding step. Valid values are either + 'hotspot' or 'one_time_notice'. name: type: string description: | @@ -18574,6 +18576,10 @@ components: description: | The description of the hotspot, as will be displayed to the user. + delay: + type: number + description: | + The delay after which the user should be shown the hotspot. has_trigger: type: boolean description: |