This commit simplifies the CSS selectors in the left sidebar styles by
replacing generic `a` selectors with more specific class selectors.
This change enhances the specificity of the styles, and improves the
selectors' performance.
This commit addresses the issue where pressing the ENTER key on the
"back to channels" link in the zoomed in topics list did not perform
the intended action by adding the `trigger-click-on-enter` class to
the element.
This commit addresses the issue where pressing the ENTER key on the
"back to channels" link in the zoomed in direct messages list did not
perform the intended action by adding the `trigger-click-on-enter`
class to the element.
This commit addresses the issue where pressing the ENTER key on the
"more conversations" link in the direct messages list did not perform
the intended action by adding a `trigger-click-on-enter` class to the
element.
This allows the `process_enter_key` function to explicitly trigger a
click event on the element when the ENTER key is pressed, ensuring that
the associated click handler is called.
Earlier, we were passing a map `device_id_to_encrypted_data`
and http headers as separate fields to bouncer.
The downside of that approach is it restricts the bouncer to
process only one type of notice i.e. either notification for
a new message or removal of sent notification, because it
used to receive a fixed priority and push_type for all the
entries in the map.
Also, using map restricts the bouncer to receive only one
request per device_id. Server can't send multiple notices
to a device in a single call to bouncer.
Currently, the server isn't modelled in a way to make a
single call to the bouncer with:
* Both send-notification & remove-notification request data.
* Multiple send-notification request data to the same device.
This commit replaces the old protocol of sending data with
a list of objects where each object has the required data
for bouncer to send it to FCM or APNs.
This makes things a lot flexible and opens possibility for
server to batch requests in a different way if we'd like to.
'get_apns_payload_data_to_encrypt' was added in commit
0ae34ddb65, in parallel
to 'get_message_payload_apns' - to use in E2EE codepath.
The intent was to avoid nesting in the payload returned
by 'get_message_payload_apns' function, just like FCM
payload returned by 'get_message_payload_gcm'.
Turned out, the nesting is helpful in APNs case for various
reasons. So, this commit reverts that function and we'll
continue to use the older structure returned by the function
'get_message_payload_apns'.
This commit updates the subscribers and group members table CSS to
use fixed layout. This helps in having user pill take the width if
available and we can show more characters.
Previously the width of name in user pill was set to have a max
width of 165px which meant the there was some empty unused space in
the rows especially on narrow screens when email column was hidden.
Fixes#35157.
This is only `text/plain`, currently. In such cases where the
client-provided content-type also does not specify a `charset`, we use
`chardet` to make a guess, and store that guess to provide later when
serving the content. The detection is done in a streaming fashion,
and thus should not require re-downloading the full content.
Previously, the `user_file.content_type` only contained the MIME type
of the uploaded file; no other parameters were included, meaning that
a file a client specified as `content-type: text/plain; charset=big5`
would be stored with an `Attachment.content_type` of `text/plain`.
Re-construct the full content-type header from `content_type_extra`,
which includes those parameters.
We do not include a test because Django does not support specifying
such parameters in the upload path.
Commit c049259d07 (#33739) should have
removed this completely, rather than merely removing its
is_billing_admin member.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
To maintain API compatibility, we render the email notification for
missed 1:1 direct messages using DirectMessageGroup with the same
format as messages sent to a Personal recipient.
This commit updates 'handle_remove_push_notification' function
to use the new 'send_push_notifications' function.
It leads to encrypt the removal payload before sending it to bouncer.
Fixes part of #35368.
We do not want icon + `Keyboard Tip:` to occupy it's own row. Our
approach for this component and most of the logic is similar to
ZulipTip. We prefer having separate components for note, tip and
keyboard tip, that is why we have duplicated code between ZulipTip and
KeyboardTip, we should think about having a single underlying component
for both to avoid duplication in the future.
We do not have any cases of non paragraph content in keyboard tip, so we
have removed that chunk of code when copying over logic from ZulipTip.
We do not want to have a heading for every tip and thus we created a
custom component for our aside. We want to add a lightbulb icon and the
text `Tip:` is bold as a prefix for every tip as if it was already part
of the text. To do that, we cannot insert both of those as html seperate
from the slot html, we had to access the slot html and insert both of
them into the HTML tree.
We focus on the middle row instead of the top which is what we
use for recent view. Recent view doesn't have this problem, AFAIK,
so hopefully this will fix it.
This commit adds support to let server configure:
* fcm_priority
* apns_priority
* apns_push_type
while sending E2EE push notifications.
The values of these fields will vary depending on whether the
send request is to send push notification for a message or
revoke an already sent notification.
Since, the bouncer receives encrypted data so it can't inspect
the payload to determine whether it is a removal request or not,
hence can't configure priority on its own.
The server needs to specify explicitly.
We're not simply sending a single 'is_removal' flag because
allowing the server to configure them separately will help in
future to support other types of notifications with a different
combination of priority and push_type, like whose aim is to notify
user about information other than a new message or removal request.
Fixes part of #35368.
In 'test_e2ee_push_notifications', the `SendPushNotificationTest` class
is already decorated with `@activate_push_notification_service()`,
so individual test methods do not need to repeat it.