Commit Graph

60574 Commits

Author SHA1 Message Date
Alex Vandiver 22300373d3 install: We need postgresql.version with zulip::postgresql_client too.
5308fbdeac split out `zulip::postgresql_client`, and 80ef38757a
made it no longer depend on `zulip::postgresql_common`, but directly
on `zulipconf('postgresql', 'version', undef)`.  However, the
installer depended on recognizing `zulip::postgresql_common` in the
list of pulled-in classes to know that we needed to keep the
`postgresql.version` setting in `/etc/zulip.conf`.

Update the installer to also recognize `zulip::postgresql_client` as a
class which tells us to keep `postgresql.version` in our settings.
2024-09-11 09:54:43 -07:00
Tim Abbott 2585d209c0 user_groups: Rename misleadingly named view function. 2024-09-11 09:43:56 -07:00
Sahil Batra 688c5ad0af groups: Allow excluding deactivated groups in 'GET /user_groups' response. 2024-09-11 09:43:56 -07:00
Sahil Batra fef2925ff0 mention: Handle mentioning deactivated user groups.
If someone tries to mention a deactivated user group,
then it is automatically converted to a silent mention
like we do for deactivated users.
2024-09-11 09:43:56 -07:00
Sahil Batra c1d6da0a5c user_groups: Update handling of deactivated groups.
We only allow updating name of a deactivated group, and not
allow updating description, members, subgroups and any setting
of a deactivated user group.

Deactivated user groups cannot be a a subgroup of any group
or used as a setting for a group.
2024-09-11 09:43:56 -07:00
Sahil Batra e1cfe61452 user_groups: Add API support for deactivating user groups. 2024-09-11 09:43:56 -07:00
Sahil Batra bef7cfe00f user_groups: Add deactivated field to NamedUserGroup model. 2024-09-11 09:43:56 -07:00
Sahil Batra f0c0eef8dc groups: Lock user group rows while using them for settings.
This is important to make sure that we handle cases when there
are two parallel requests - one for using a group for a setting
and one for deactivating the same group. This makes sure that
atleast one of the above task fails.
2024-09-11 09:43:56 -07:00
Alex Vandiver 38053e9c7c emoji: Convert spritesheets to webp.
This provides significant size savings:

| Emoji set   | png size | webp size | webp/png percent |
| ----------- | -------- | --------- | ---------------- |
| google-blob |  1968954 |   1373350 |           69.75% |
| twitter     |  2972820 |   2149672 |           72.31% |
| google      |  3455270 |   2327834 |           67.37% |

Since these are the largest assets that we ship to clients, it is
worth shaving off every byte we can.
2024-09-11 09:03:47 -07:00
Alex Vandiver a2517e1115 build-emoji: Reorganize /srv/zulip-emoji-cache.
This more explicitly splits out the files bound for web/generated/ from
those bound for static/generated/.
2024-09-11 09:03:47 -07:00
Alex Vandiver 5eb38f24ec setup_venv: Fix name of libvips in yum.
RHEL provisioning likely doesn't currently work, but no reason to not do slightly better.
2024-09-11 09:03:47 -07:00
Aman Agrawal a6e3a38e68 typeahead: Remove unsubscribe icon. 2024-09-11 08:26:52 -07:00
Aman Agrawal 93e0561857 message_events: Fix CI failure.
Broken in #31540
2024-09-11 12:05:44 +05:30
evykassirer 05e58de3f5 stream_data: Get stream id instead of name from slug.
This more closely matches the mobile code.
https://github.com/zulip/zulip/pull/31299#discussion_r1719556337

This shouldn't have any functional changes.
2024-09-10 17:51:39 -07:00
evykassirer b6830ff5df narrow_state: Remove unused search_string function. 2024-09-10 17:51:39 -07:00
evykassirer a4f7db3c4b compose_reply: Use narrow stream_id instead of parsing filter operand. 2024-09-10 17:51:39 -07:00
Aman Agrawal 8763d55911 message_events: Fix live update for views based on message property.
Fixes #31208
Fixes #14510
2024-09-10 17:28:04 -07:00
Aman Agrawal c653508aa5 message_parser: Directly use message content to check property.
This will allow us to use these functions in message events where
the full message object is not available.
2024-09-10 17:28:04 -07:00
evykassirer d6cad7c018 message_list_view: Calculate subscription markers without group.
This is part of a bigger refactor to calculate message list group
attributes and creating the group all at once instead of piecewise.
This is necessary to convert this module to typescript, since a
partially formed group is hard to type.
2024-09-10 17:20:00 -07:00
evykassirer d1a05bbdac message_list_view: Calculate edited_notice_locations without message_container.
This is part of a bigger refactor to calculate message container
attributes without the container, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-09-10 17:20:00 -07:00
evykassirer 0b4f8e56b7 message_list_view: Move class properties to top of class. 2024-09-10 17:20:00 -07:00
evykassirer f57221e78d message_lists: Remove duplicate MessageContainer type.
Note that the `MessageContainer` type in `compose_fade` doesn't
include the `url` property, but I haven't encountered a need for
this property during the work to convert `message_list_view` to
typescript, so it seems fine to remove it here.
2024-09-10 17:20:00 -07:00
evykassirer c02f4ff941 message_list_view: Calculate message_container_variables without the container.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-09-10 17:20:00 -07:00
evykassirer df6d592d1c message_list_view: Calculate message_edited_vars from just the message.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-09-10 17:20:00 -07:00
evykassirer e40efcc390 message_list_view: Get topic edit properties instead of mutating group.
This is part of a bigger refactor to calculate message list group
attributes and creating the group all at once instead of piecewise.
This is necessary to convert this module to typescript, since a
partially formed group is hard to type.
2024-09-10 17:20:00 -07:00
evykassirer 541228f817 message_list_view: Only pass messages to update_group_date.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-09-10 17:20:00 -07:00
evykassirer 71d01291b6 message_list_view: Replace util.same_sender with sender_id check. 2024-09-10 17:20:00 -07:00
evykassirer b387ad24fa timerender: Move util.the into render_date. 2024-09-10 17:20:00 -07:00
Mateusz Mandera b572b1536a test_retention: Delete irrelevant comment.
This comment is clearly out of place and at this point doesn't match any
of the classes in a useful way.
2024-09-10 17:07:47 -07:00
Mateusz Mandera ce5439d87f retention: Remove outdated compat block for delete_message events.
As noted in the comment in that block, this is no longer useful.
2024-09-10 17:07:47 -07:00
roanster007 bc384094d3 narrow: Make `with` operator behaviour consistent with API behaviour.
Previously, in presence of `dm` operators, the `with` operator
behaviour in the web client was not consistent with that of
the API. For instance, when `with` points to a stream message,
in presence of a `dm` term, then rather than narrowing to the
corresponding channel of `with` operand, the `with` term simply
used to be ignored, and narrowed to the corresponding `dm`
narrow.

Also, in cases when the `with` used to point to a direct message,
in presence of a `channel` term, then after correcting to the
right narrow, the `with` term used to be removed. The `with`
term would still be needed after correcting the narrow to
maintain consistency between channel and dm conversations.

This commit removes these inconsistencies of `with` in case
of `dm` operators, and makes it consistent to those mentioned
in the api documentation.
2024-09-10 16:29:49 -07:00
opmkumar 719518baba popovers: Add stream-info-popover when channel pill is clicked.
Shows a stream info popover whenever a channel pill is clicked (such
as in the pill widgets for adding subscribers to a channel or
invitations). The stream info popover contains channel icon and name,
channel description and a link to channel settings.

Fixes #30567.
2024-09-10 16:16:53 -07:00
opmkumar 5ecdf56336 popovers: Fix references to nonexistant popover-menu-inner-list-item.
These should have been popover-menu-list-item.
2024-09-10 16:16:53 -07:00
Varun Singh d6c34f64dd tests: Use `make_user` & `make_bot` to create test user & bot. 2024-09-10 16:02:35 -07:00
Varun Singh f9f2c32d21 example_user: Add helper functions to create user. 2024-09-10 16:02:35 -07:00
Varun Singh 4c2bb4dbe3 tests: Rename `test_stream.js` to `example_stream.js`. 2024-09-10 16:02:35 -07:00
Tim Abbott ad890890f6 lint: Fix several duplicate word typos. 2024-09-10 15:59:00 -07:00
Aman Agrawal 21b6bb9887 message_list_data_cache: Update when receiving new messages.
If we receive a message that we can add to the data cache without
talking to the server, we do that, otherwise we remove it from the
cache to avoid us having wrong filter status cached.
2024-09-10 15:58:15 -07:00
Aman Agrawal 5b9a2584c5 message_list_data_cache: Cache MessageListData objects.
We start caching MessageListData objects for the narrows which
user has visited. We restore the cached objects if the filters
match. Also, the cached objects are updated based on events. One
major piece is update path the is pending implementation is the
message move code path.
2024-09-10 15:58:15 -07:00
Aman Agrawal 259e77fbf6 message_list_data: Track if the data is rendered using message list id.
This is an easy way to track if a MessageListData is rendered.
Storing MessageList object would make us liable to cleanup the
MessageList object when the data is no longer in use.

Note that this is more like "likely / past rendered message list id",
we will have to check currently rendered message list data to verify
if the data object is really rendered.
2024-09-10 15:58:15 -07:00
Aman Agrawal fee108949d messsage_lists: Extract method to delete a rendered list. 2024-09-10 15:58:15 -07:00
Ikko Eltociear Ashimine 0507f65da5
realm_settings: Fix duplicate word typos in comments. 2024-09-10 15:55:14 -07:00
joseph 65893292b5 channel_subscribe: Use IDs instead of emails when processing results.
As part of our todo in the code, we want to use the unique user IDs
instead of emails when processing the results of subscribing users to a
channel. These changes apply those changes and streamlines the use of IDs.
2024-09-10 15:37:38 -07:00
opmkumar 62f74fcb83 search: Hide close button in empty filter streams and filter topics.
Fixes #21297.
2024-09-10 15:36:30 -07:00
Bedo Khaled ad2ef71320
translation: Add new tip to Spanish translation guide. 2024-09-10 14:51:54 -07:00
Karl Stolley 8ff3fb5fec message_row: Reduce space above collapsed Show More button.
This only impacts collapsed Show More buttons in a message with a
sender.

Fixes #31221
2024-09-10 14:06:58 -07:00
adnan-td eaaf26e182 buddy_list: Remove deactivated users from right sidebar.
Filter out inactive people from the buddy list in the right
sidebar.
2024-09-10 14:04:26 -07:00
Mateusz Mandera a36f906d1a presence: Add history_limit_days param to the API.
This param allows clients to specify how much presence history they want
to fetch. Previously, the server always returned 14 days of history.
With the recent migration of the presence API to the much more efficient
system relying on incremental fetches via the last_update_id param added
in #29999, we can now afford to provide much more history to clients
that request it - as all that historical data will only be fetched once.

There are three endpoints involved:
- `/register` - this is the main useful endpoint for this, used by API
clients to fetch initial data and register an events queue. Clients can
pass the `presence_history_limit_days` param here.
- `/users/me/presence` - this endpoint is currently used by clients to
update their presence status and fetch incremental data, making the new
functionality not particularly useful here. However, we still add the
new `history_limit_days` param here, in case in the future clients
transition to using this also for the initial presence data fetch.
- `/` - used when opening the webapp. Naturally, params aren't passed
here, so the server just assumes a value from
`settings.PRESENCE_HISTORY_LIMIT_DAYS_FOR_WEB_APP` and returns
information about this default value in page_params.
2024-09-10 13:15:35 -07:00
Mateusz Mandera 6ce096c0ff zerver: Rename some message_type variables to recipient_type. 2024-09-10 12:50:28 -07:00
Mateusz Mandera 8505de7b19 populate_db: Rename message_type to recipient_type. 2024-09-10 12:50:28 -07:00