mirror of https://github.com/zulip/zulip.git
3a710ab996
Having an optional stream_name parameter makes it confusing to read the code if you know your webhook is sending private messages. And then the other two callers are already checking topics, so they might as well check stream names, too. We also have the two stream-oriented callers make their own call to "subscribe". And we future-proof this by making sure the exception for no-message-being-sent calls out that gotcha. Somewhat in passing, we now assert that self.STREAM_NAME is not None in the main helper. This is partly to satisfy mypy, but it's also a good sanity check. This also sets the stage for the next commit, where I'll add an assert_stream_message helper. |
||
---|---|---|
.. | ||
data_import | ||
lib | ||
management | ||
migrations | ||
openapi | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |