Commit Graph

66477 Commits

Author SHA1 Message Date
Lauryn Menard
1caff10df7 corporate: Send fixed-price stale audit log internal billing email.
Still send an internal billing notice when a fixed-price plan is
invoiced while the remote server has stale audit log data. This
does not trigger updating the stale_audit_log_data_email_sent
field on the CustomerPlan as the plan will be invoiced in this
case.
2025-08-27 11:54:33 -07:00
Lauryn Menard
208f1b30db corporate: Invoice self-hosted fixed-price plans with stale data.
Because license counts do not change the amount due for plans with
a fixed-price, we invoice them for self-hosted customers even when
the audit log data from the server is stale.
2025-08-27 11:54:33 -07:00
Lauryn Menard
d8a5105705 corporate: Add test for stale audit log fixed-price plan.
Confirms that currently if a fixed-price plan for a self-hosted
customer has stale audit log data, the plan will not be invoiced.
2025-08-27 11:54:33 -07:00
Lauryn Menard
699c0c6200 create-channel: Remove send_new_subscription_messages parameter.
Removes send_new_subscription_messages parameter from
`POST channel/create` endpoint as Notification Bot DMs
are never sent when users are subscribed as part of
creating a new channel.

Not considered a documentable API change, since the previous parameter
never had any effect, so this is effectively just a documentation and
error-handling bug fix, not an API change relevant to implementors.
2025-08-27 11:12:05 -07:00
Lauryn Menard
dda2c6e285 create-channel: Clarify flow of new channel and subscription notices.
Updates comments in send_user_subscribed_and_new_channel_notifications
so that it is clearer what notification each "if" block of the function
is generating.

Also, moves variables that are only used in the user subscribed DMs to
that "if" block.
2025-08-27 11:12:05 -07:00
Lauryn Menard
8b1e536e6b create-channel: Rename send_messages_for_new_subscribers helper.
Because send_messages_for_new_subscribers also sends channel
notification messages about newly created channels, a clearer
name for is send_user_subscribed_and_new_channel_notifications.
2025-08-27 11:12:05 -07:00
Pratik Chanda
6af4e82c49 notifications: Fix desktop notifications for message not grouping.
Earlier, message notifications for same key would not get grouped
together because of the old notification_object close event listener
firing up when not supposed to.

This commit fixes this behaviour by checking the notification object
instance is the same as the currently displayed notification object
from notice memory when closing it.

Co-authored-by: prakhar1144 <prakhar@zulip.com>
2025-08-27 10:59:38 -07:00
Prakhar Pratyush
5a37942c61 push_notifications: Parse push/e2ee/notify response using Pydantic.
In `send_push_notifications`, we were manually asserting types of the
fields returned by the `remotes/push/e2ee/notify` endpoint at runtime
and constructed the `response_data` data structure for further use.

Pydantic is the perfect tool for this task.

This commit updates the concerned code to use Pydantic's `TypeAdapter`.

No functional change.

Fixes part of #35368.
2025-08-27 10:58:10 -07:00
Prakhar Pratyush
3548764e21 push_notifications: Use SentPushNotificationResult dataclass.
Refactoring, no functional change.

This commit refactors `send_e2ee_push_notification_apple`
and `send_e2ee_push_notification_android` to return a
`SentPushNotificationResult` dataclass.

It's a cleaner protocol than passing a mutable data structure
`delete_device_ids` as argument and updating it within
functions.

Fixes part of #35368.
2025-08-27 10:56:42 -07:00
Aman Agrawal
3e7e81581c inbox: Show muted icon for muted channels. 2025-08-27 10:30:12 -07:00
Aman Agrawal
917a78ef52 inbox: Don't show same tooltip for all recipient_bar_icon icons.
We need to show different tooltip for channel row visibility icons.
2025-08-27 10:30:12 -07:00
Alex Vandiver
d15f2fb831 export-search: Use background workers to download attachments. 2025-08-27 10:24:21 -07:00
Alex Vandiver
7714ca3ff9 export-search: Add explicit usermessage message_id range filters. 2025-08-27 10:24:21 -07:00
Alex Vandiver
b9216c768d export-search: Use chunked regions by id range. 2025-08-27 10:24:21 -07:00
Alex Vandiver
e703f65198 export-search: Joins to usermessages may require adding a distinct. 2025-08-27 10:24:21 -07:00
Alex Vandiver
e9c6856d02 export-search: Limit to only the fields we need. 2025-08-27 10:24:21 -07:00
Alex Vandiver
ae090d9ff3 export-search: Prefetch message sender.
This avoids O(n) extra queries.
2025-08-27 10:24:21 -07:00
Alex Vandiver
6a74f2d889 docs: Add upgrade instructions for Debian 12 -> 13. 2025-08-27 09:32:22 -07:00
Alex Vandiver
4fc49db781 cache: Adjust to pickle_protocol=5, since we require Python 3.8+.
https://docs.python.org/3/library/pickle.html#data-stream-format
2025-08-27 09:22:56 -07:00
Alex Vandiver
c68be03df7 markdown: Remove vestigial Twitter code and cache.
Contrary to what the comment implied, the remaining `fetch_tweet_data`
function would never return a cache hit, as it is namespaced by the
current deploy's cache key.
2025-08-27 09:22:56 -07:00
Alex Vandiver
9715f6c104 cache: Use zstd compression level 9 for bmemcached compression. 2025-08-27 09:22:56 -07:00
Alex Vandiver
33e6d78f3b memcached: Switch to zstd compression.
This cannot go in `CACHES` because a module cannot be serialized via
pickle.
2025-08-27 09:22:56 -07:00
Alex Vandiver
3b1df07e7e dependencies: Add zstd. 2025-08-27 09:22:56 -07:00
Alex Vandiver
52671fd486 message_cache: Skip pickling JSON-encoded string in cache. 2025-08-27 09:22:56 -07:00
Alex Vandiver
7f325108a3 message_cache: bmemcache already applies compression.
This will appear to _increase_ time spent in memcached, according to
our access logs.  This is because we used to apply zlib compression
twice -- once, outside of our performance logging, and a
second (ineffectual) time inside.  We now only compress once, which
reduces the overall time, and accounts for it more correctly.
2025-08-27 09:22:56 -07:00
Alex Vandiver
9c92fe8f34 streams: Skip pickling the recipient string in cache. 2025-08-27 09:22:56 -07:00
Alex Vandiver
0d6cfc2a63 cache: Add pickled_tupled=False to allow skipping pickling for str/bytes. 2025-08-27 09:22:56 -07:00
Aman Agrawal
b771f92ea1 stripe: Return 400 error instead of 500 on invalid tier. 2025-08-27 09:08:55 -07:00
Mateusz Mandera
5ef6852cfe delete_in_topic: Don't unnecessarily fetch .recipient.
This reverts commit f119c33789.
With 51cef01c29 merged, there is no need
to fetch .recipient here, as it won't be accessed by the delete messages
codepath.
2025-08-27 09:08:00 -07:00
Karl Stolley
cacc89e4d0 dom_selection: Select mousemove handlers on document. 2025-08-27 08:58:53 -07:00
Karl Stolley
e5a14ca3f1 dom_selection: Select scroll elements as :root. 2025-08-27 08:58:53 -07:00
Karl Stolley
4f681abf3c dom_selection: Get and set all CSS on :root. 2025-08-27 08:58:53 -07:00
Karl Stolley
e8f5c46054 reminders: Show vdots with reminders popover open. 2025-08-27 08:58:06 -07:00
Alex Vandiver
baecf15955 docs: Add upgrade note for S3_SKIP_CHECKSUM.
This forward-ports bc3753d859, which was only merged into 10.x.
2025-08-26 12:34:47 -04:00
apoorvapendse
533f177175 tests: Make puppeteer tests for drafts more robust.
I noticed that when you are in a group dm narrow
and open drafts, the overlay-message-row class
is inside different containers, and the nth last
child check does not apply for that case, which is
why the test failed.

More generally, last-child is just not a good selector for robust
testing.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-08-19 23:44:01 -07:00
apoorvapendse
7391a2983f links: Fix unnecessary blocking of click behavior.
Links become unclickable if the following is true:
1. Composebox is open
2. You have selected some text

Currently doing this will prevent the default click behavior
which is a big bug and can get quite annoying.

We now switch to a more robust check which only prevents the
click behavior if some drag evidence is present, determined with
`mouse_drag.is_drag`

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-08-19 23:43:58 -07:00
Shubham Padia
5938f685ad starlight_help: Display gradient for the idle status icon.
Fixes #35496.

We were displaying a solid color until we figured out how to accurately
display the gradient in the SVG itself.
2025-08-19 23:40:51 -07:00
Alex Vandiver
72ea340f80 puppet: Skip client reloads during weekly restarts.
Weekly restarts do not deploy any new client code, so there is no
reason to push clients to reload.
2025-08-19 23:39:38 -07:00
Alex Vandiver
bef864251b reload-clients: Ensure that Smokescreen does not interfere with reloads.
When run from cron, reload-server (and thus reload-clients) picks up
the `HTTP_proxy` environment variable, which redirects HTTP requests
through Smokescreen -- which prevents localhost requests.  This
results in clients never getting sent reload events.

Explicitly unset proxies when talking to localhost in reload-clients.
2025-08-19 23:39:38 -07:00
Alex Vandiver
3d1a4e718e zilencer: Limit all hostname lookups with deactivated=False.
We enforce at registration time that hostnames with deactivated=False
must be unique, though we do not enforce it in the database because we
have historical data for which that is not true.

However, we should perform all hostname lookups with a
`deactivated=False` filter, as that will resolve the majority of
`RemoteZulipServer.MultipleObjectsReturned` errors.  Once the
production data is cleaned up, this can be enforced via a partial
unique index.
2025-08-19 23:38:13 -07:00
Alex Vandiver
2dd8818517 zilencer: Fix typo in comment. 2025-08-19 23:38:13 -07:00
Mateusz Mandera
51cef01c29 message: Use .is_channel_message column instead of is_stream_message().
This avoids a potential unnecessary message.recipient fetch required by
is_stream_message(). is_stream_message() methods precedes the addition
of the denormalized is_channel_message column and is now unnecessary.

In practice, we usually fetch Message objects with `.recipient` already,
so I don't expect any notable performance impact here - but it's still a
useful change to make.
2025-08-19 23:37:07 -07:00
Mateusz Mandera
4e3ec77a0f retention: Eliminate join with Recipient table when archiving DMs.
We can use the is_channel_message column instead of doing the join to
filter on recipient type.
2025-08-19 23:36:10 -07:00
Alex Vandiver
fd4104f365 ci: Test upgrades from 11.0. 2025-08-19 23:35:09 -07:00
Pratik Chanda
f9dc13014f hotkey: Fix argument type for narrow filter.
This commit fixes the operand argument type passed in for showing
message list.
2025-08-19 09:11:36 +05:30
Alex Vandiver
bcdc2bd491 docs: Fix a typo in supported backups_compression_method values. 2025-08-18 15:40:09 +00:00
Kislay Verma
a03e3a5166 ui_init: Fix bug in argument type.
As per the type definition of `NarrowTerm`,
the operand should be a string.

This bug caused exceptions each time a topic was
clicked in the left sidebar.
2025-08-18 18:27:18 +05:30
Maneesh Shukla
6787a14d74 tooltips: Use group ID instead of name for tooltip IDs.
Previously, tooltip templates were identified using the
group's name in their `id` attributes.

This change uses the group's ID instead, which is more reliable.
2025-08-15 10:17:30 -07:00
Maneesh Shukla
daa98c72d3 tooltips: Use stream ID instead of name for tooltip IDs.
Previously, tooltip templates were identified using the
stream's name in their `id` attributes.

This commit changes the tooltip IDs to use the stream's ID instead,
rather than its name, to ensure uniqueness and avoid potential conflicts.
2025-08-15 10:17:30 -07:00
Anders Kaseorg
7b0c6f9d3f dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-14 21:37:50 -07:00