Currently we only pass headers in the first client_get call but
sometimes the effective request which reaches the view is through
a later call to the client_get in this function. Due to which
headers are not passed.
Also move a couple of comments inside the functions they describe,
because they're about the implementation of the functions rather
than their interface.
Also add a comment explaining why the order in this file matters.
It's not obvious that it should, so it's otherwise tempting
to reorder them to optimize only for readability.
Instead of recommending our users to download and install our
bindings "to the <integration_name> server", we now recommend
installing our bindings "to the server where the
<integration_name> bot lives". Technically, the latter is more
accurate.
Now, we further clarify in the create-stream.md macro that even
if users follow our default stream name recommendation for a
given integration, said stream must still be explicitly created.
jQuery's behavior in methods that, because of their nature, don't need to
return anything is to return the element itself in the jQuery object form.
Now the zjquery element is returned when one of these methods is called.
There are some cases when the jQuery dollar
function is called with an element as argument.
If such element has already been created using
zjquery, we should simply return it.
Since util.extract_pm_recipients() won't return a recipient if it's only
composed by whitespaces, considering such recipient in the matcher is
unnecessary.
Similar code appeared at two places (the code is meant to remove the
leading @-mention before passing the remainder of the message to the
bot handler)—both 'zerver/worker/queue_processors.py' and
'api/bots_api/bot_lib.py'.
Remove function from the queue_processors.py file and let the entire message
be processed (includes removing of @-mention) at bot_lib.py.