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.
We use this function to show who's typing in the
direct messages narrow.
Renamed it because, with the addition of stream typists to
`typist_dct` in the next commit, this might be confusing.
This commit addresses the discussed issue by renaming
'get_all_typists()' to 'get_all_direct_message_typists'.
For the timing part of sending requests, it will be the same
as DMs, as the code in 'typing_status.ts' is being reused
for that purpose.
As a note, 'state.current_recipient_ids' and 'new_recipient_ids'
of update() in 'typing_status.ts' used to be an array of recipient ids.
Renamed them to 'state.current_recipient' and 'new_recipient' as they
can now be either of:
1) An object of format {stream_id: 2, topic:'hello'}
2) an array of recipient user IDs like previously
Also, made required changes in 'typing_status.ts' and
'typing_status.js.flow', i.e., documenting the new format of
new_recipient.
Co-authored-by: Prakhar Pratyush <prakhar841301@gmail.com>
When the `type` of the message being composed is "stream",
this commit updates the `to` parameter to accept the ID of
the stream in which the message is being typed.
Earlier, it accepted a single-element list containing the ID
of the stream.
Sending the element instead of a list containing the single element
makes more sense.
This is a prep commit that extracts the following two methods
from '/actions/scheduled_messages' to reuse in the next commit.
* extract_stream_id
* extract_direct_message_recipient_ids
The 'to' parameter for 'POST /typing' will follow the same pattern
in the next commit as we currently have for the 'to' parameter in
'POST /scheduled_messages', so we can reuse these functions.
This commit removes the compatibility support for "private"
being a valid value for the 'type' parameter in 'POST /typing'.
"direct" and "stream" are the only valid values.
This commit replaces the value `private` with `direct` in the
`message_type` field for the `typing` events sent when a user
starts or stops typing a message.
The logic for formatting code is generalised to make it reusable for
multiple styles of formatting (added in the next commits).
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
This commit replaces all previous Font Awesome references in the
left side bar and relevant popovers with the custom Zulip star
icon.
Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
This commit renames the classes and IDs in the views area
(formerly global filters) to a set of flexible values all
prefixed in some way with `left-sidebar-navigation`.
This is meant to make the styles and structures in the area
more readable, while also keeping things flexible into the
future as this area's elements change.
Co-Authored-By: Hardik Dharmani <Ddharmani99@gmail.com>
This is Prep commit that introduces 2 new CSS variable
`--color-background-unread-counter` and
`--color-background-unread-counter-popover-menu` that has value
`hsl(105deg 2% 50% / 50%)` in dark theme and `hsl(105deg 2% 50%)`
in light theme for unread counter and `hsl(200deg 100% 40%)`
for unread counter in popover menus to match its blue theme.
This is a Prep commit. This commit fixes the color of
`BACK TO STREAMS` label in the dark theme to be equal to other labels
in left sidebar such as `STREAMS` label.
Upgrading stripe to 6.0.0 in e32366638a
breaks our Stripe integration due to API version change making us fail
to finalize creating an invoice and charge the customer.
For the upstream details see:
60ab6ac7d7/CHANGELOG.md (600---2023-08-16)
6.0.0 uses 2023-08-16 Stripe API version unless specified otherwise. We
want to use 2020-08-27.
Setting stripe.api_version in corporate/lib/stripe.py is sufficient for
it to be set everywhere else. This is supported by the fact that we also
only set stripe.api_key in that file.