These existing typing related functions are re-usable in the
case of stream typing, except that the key differs. So, to make
it possible to re-use the code in these functions, this commit
removes the `get_key` call in those functions and instead passes
the key directly.
Also, renamed `get_key` to `get_direct_message_conversation_key`
to differentiate it from the `get_topic_key` that we'll add later
for stream typing.
Adds support in the web app for `dm` operator. This will deprecate
the `pm-with` operator, but existing links/URLs are still supported
for backwards-compatilibity.
This commit updates the web app default behaviors to default to
the new narrow/URLs `dm/...` and `/#narrow/dm/...` when navigating
and searching in the app.
There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.
The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>