mtx::events::state::Widget struct

Content of the m.widget event.

https://github.com/matrix-org/matrix-doc/issues/1236

Public variables

std::string type
Required. The type of widget. This is used to determine which widgets can be grouped together on the UI (e.g multiple grafana graphs together).
std::string url
Required. The URL of the widget. All widget-enabled matrix clients need to transform this URL into a final URL which they will perform an HTTP GET to. All substituted values are url-encoded.
std::string name
Optional. A human-readable string which can be displayed instead of, or in addition to, the embedded <iframe>.
std::string id
Unique id.
std::map<std::string, std::string> data
Optional (unless required by a widget type below). Arbitrary key/value pairs.
bool waitForIframeLoad
This flag is used to denote whether the client should display a placeholder / loading spinner while waiting for the widget content to return a loaded event.
std::string creatorUserId
The creatorUserID field is required. It is used to identify the user that added the widget instance (as opposed to the user that last modified the widget instance, as given by the 'sender' field on the m.widgets event).