zulip/zerver
Steve Howell 69517f5ac5 Support zform-based widget content in the server.
API users, particularly bots, can now send a field
called "widget_content" that will be turned into
a submessage for the web app to look at.  (Other
clients can still rely on "content" to be there,
although it's up to the bot author to make the
experience good for those clients as well.)

Right now widget_content will be a JSON string that
encodes a "zform" widget with "choices."  Our first
example will be a trivia bot, where users will see
something like this:

    Which fruit is orange in color?

        [A] orange
        [B] blackberry
        [C] strawberry

The letters will be turned into buttons on the webapp
and have canned replies.

This commit has a few parts:
    - receive widget_content in the request (simply
        validating that it's a string)
    - parse the JSON in check_message and deeply
        validate its structure
    - turn it into a submessage in widget.py
2018-05-24 09:30:22 -07:00
..
lib Support zform-based widget content in the server. 2018-05-24 09:30:22 -07:00
management create_realm_internal_bots: Refactor to extract main op as a function. 2018-05-23 11:53:22 +05:30
migrations migrations: Add missing reverse_code for migration 0167. 2018-05-21 09:42:19 -07:00
templatetags mypy: Set local_partial_types = True. 2018-05-21 22:41:00 -07:00
tests Support zform-based widget content in the server. 2018-05-24 09:30:22 -07:00
tornado tornado: Ensure that tornado doesn't autoreload into syntax errors. 2018-05-20 16:50:10 -07:00
views Support zform-based widget content in the server. 2018-05-24 09:30:22 -07:00
webhooks webhooks: Migrate to UnexpectedWebhookEventType. 2018-05-22 08:30:19 -07:00
worker tests: Disable slow query messages in test environment. 2018-05-20 10:16:53 -07:00
__init__.py
apps.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
context_processors.py two_factor: Add templates for 2-factor-auth setup. 2018-05-02 15:20:49 -07:00
decorator.py 2FA: Add zulip_otp_required decorator. 2018-05-23 15:46:57 -07:00
filters.py zerver: Use Python 3 syntax for typing. 2017-11-28 16:49:36 -08:00
forms.py 2FA: Add two-factor related code. 2018-05-23 15:46:56 -07:00
logging_handlers.py test_logging_handlers: Mock out `git describe` because can be slow. 2018-03-23 18:24:51 -07:00
middleware.py zerver: Change use of typing.Text to str. 2018-05-12 15:22:39 -07:00
models.py registration: Allow users to import settings from other realm. 2018-05-23 10:30:00 -07:00
signals.py emails: Fix spelling of "Unknown IP" and tag for translation. 2018-04-30 12:04:39 -07:00
static_header.txt
storage.py mypy: Improve typing for ManifestStaticFilesStorage monkeypatch. 2017-12-08 19:00:18 -08:00