Skip to content

polls: Read-only support #165

Closed
@gnprice

Description

@gnprice

As a first step of poll support (#164), we should render poll messages.

For product context, see https://zulip.com/help/create-a-poll .

For details of this part of the API… unfortunately this is one of the few remaining parts of the Zulip API that is effectively undocumented, and one has to resort to reverse-engineering. Two useful resources for reference are:

  • The implementation in zulip-mobile, which comes from reverse-engineering and embodies notes about the format.
    • This lives mainly in src/webview/html/message.js, in particular widgetBody. (Here "widget" is a term this part of Zulip sometimes uses for an abstraction whose primary example is polls.)
    • See also types Submessage, SubmessageData, WidgetEventData, and WidgetData in src/api/modelTypes.js, and their jsdoc.
  • The implementation in Zulip web.
    • Part of this is in JS code that's shared with zulip-mobile: see web/shared/src/poll_data.js and its neighbor poll_data.js.flow. This is used by the zulip-mobile implementation mentioned above.
    • The web-only code that consumes that poll_data module may also be informative.

Metadata

Metadata

Assignees

Labels

a-apiImplementing specific parts of the Zulip server APIa-contentParsing and rendering Zulip HTML content, notably message contents

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions