Commit Graph

62065 Commits

Author SHA1 Message Date
Niloth P
661e5c284e integrations: Update example screenshot for Jotform. 2024-12-02 18:08:58 -08:00
Niloth P
e731fb9eba integrations: Fix Jotform integration by accepting form-data payloads.
This does not add support for files.

Fixes part of #32460.

Co-authored by: PieterCK <pieterceka123@gmail.com>
2024-12-02 18:08:58 -08:00
Niloth P
2942a44224 test_classes: Support multipart/form-data content-type for webhooks.
Webhooks use "application/json" as the default content-type in
`check_webhook`, so the content-type will never be None when it reaches
`client_post`.
2024-12-02 18:08:58 -08:00
Niloth P
a0a1f55965 screenshot webhooks: Add support for multipart/form-data fixtures.
Add a common function for webhooks to convert multipart strings to dict.
This facilitates loading a multipart/form-data fixture as a file string,
and converting it.

This will allow testing integrations that use multipart/form-data,
and generating their example screenshots using a script.

Note that this only supports text fields, accommodation for binary files
is not included at the moment.
2024-12-02 18:08:58 -08:00
Niloth P
f99e1a5dba integrations: Improve message formatting for Jotform. 2024-12-02 18:08:58 -08:00
Shubham Padia
c57db30909 user_group: Confirm before joining a group they're part of via subgroup.
Fixes #32484.
2024-12-02 17:59:18 -08:00
Shubham Padia
bf73e1711d user_group: Disable leave checkmark if user isn't a direct member.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
2024-12-02 17:59:18 -08:00
Shubham Padia
8a28b31be3 user_group: List groups that a user is associated via subgroups.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes #32486.
2024-12-02 17:59:18 -08:00
Shubham Padia
c49c7a534f user_group: Show join group button if user is not a direct member.
We would show the leave group button if user was a member either
directly or via a subgroup. But that button is only applicable for
adding/removing a direct membership, so we will show the join group
button if the user belongs to a group via subgroup and not by direct
membership.
2024-12-02 17:59:18 -08:00
Shubham Padia
a491b83b79 user_group: Don't open edit panel on remove members.
When the current user was part of a group through both subgroup and a
direct membership, leaving the group would only remove the direct
membership. But since the user is part of the group through subgroup,
`is_user_in_group` will be true inside `handle_member_edit_event` which
should only be triggered when a user is on another group edit panel and
they join a group via the left panel plus button. In that case, the edit
panel of the newly joined group should open.
Instead of handling this on event, where we could not tell who triggered
the event, the current user or someone else, we now handle this in the
success callback of `add_or_remove_from_group`.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20panel.20error/near/1987891
2024-12-02 17:59:18 -08:00
Sahil Batra
513b8aabb5 help: Mention "Who can remove members from this group" setting.
Fixes #25943.
2024-12-02 17:38:46 -08:00
Sahil Batra
da02135f88 group-settings: Use new setting for controlling removing members. 2024-12-02 17:38:46 -08:00
Sahil Batra
07f17af267 user_groups: Use new can_remove_members_group setting.
Permission to remove members from group is now controlled
by can_remove_members_group setting.
2024-12-02 17:38:46 -08:00
Sahil Batra
7e6a02b82d user_groups: Add setting to control who can remove members.
This commit adds a new setting to control who can remove
members from the group.
2024-12-02 17:38:44 -08:00
Sahil Batra
3c97fbd646 tests: Refactor tests for group permission settings.
This commit refactors test such that we can test functions
used for different group permissions without duplicating
too much code.
2024-12-02 17:29:56 -08:00
Sahil Batra
819ab3989e groups: Enable joining group if user can add members.
We already allow a user to join the group if they can add members
to that group in the API, but it was not allowed in the UI. This
commit fixes the UI.
2024-12-02 17:29:56 -08:00
Sahil Batra
0f3d459d58 streams: Minor optimization in get_setting_values_for_group_settings.
Return early without doing membership query when there are no
anonymous groups.
2024-12-02 17:29:56 -08:00
Sahil Batra
1586824322 invite: Fix placeholder for pill inputs.
Placeholders for channels and groups pill inputs are updated
to "Add channels" and "Add user group" to maintain consistency.
2024-12-02 17:13:01 -08:00
Pratik Chanda
237aaf055e css: Fix overflow in channel dropdown widget in user profile.
This commit fixes the channel name overflow in dropdown widget after
selecting a long channel name and abbreviates the channel name.
2024-12-02 17:12:17 -08:00
Niloth P
53ece78de7 jenkins: Remove the secondary line text with its former name "Hudson". 2024-12-02 17:06:33 -08:00
Niloth P
40288b729c svn integration: Use "Subversion" as the display name. 2024-12-02 17:06:33 -08:00
Tim Abbott
9a83d21112 settings_users: Recalculate user ID lists after presence fetch.
This code is undertested, but it at least makes TypeScript happy.
2024-12-02 16:54:05 -08:00
Aman Agrawal
09e0ec35e1 narrow: Fix empty and_ depricated warning.
We can call `and_` with no arguments for `in-home` filter.

See https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/1682
for details.
2024-12-02 16:41:36 -08:00
Aman Agrawal
e5db6ac557 filter: Fix check for is personal filter. 2024-12-02 16:41:36 -08:00
Aman Agrawal
5ee62e599b message_fetch: Extract function to standardize API parameters.
There some common checks we need to perform before requesting
messages from the server. We extract it to be used elsewhere.
2024-12-02 16:41:36 -08:00
Aman Agrawal
1954855b6a message_fetch: Remove no longer needed check for home filter.
`Filter.public_terms` will return the same result even if the
narrow is combined feed. Since we are no longer passing
empty narrow parameters for combined feed, this condition is
not required.
2024-12-02 16:41:36 -08:00
Aman Agrawal
09c9db7b18 message_fetch: Remove inaccurate comment.
This comment became inaccurate as we made combined feed to no longer
be a special view.
2024-12-02 16:41:36 -08:00
Aman Agrawal
967fa0e24b message_events: Remove non matching edited msgs from search result. 2024-12-02 16:41:36 -08:00
Aman Agrawal
6ca04056dc message_list: Don't rerender if no messages were removed. 2024-12-02 16:41:36 -08:00
Aman Agrawal
17874e5747 message_events: Avoid populating from outdated cached msg data.
When we will no longer clear cached data on moving messages in
later commits, we have to clear cached data for the new filter when
changing narrow to avoid the message list from being populated
from it since the cached msg data is not updated as per the moved
topic and needs to be updated.
2024-12-02 16:41:36 -08:00
Aman Agrawal
1e13e3b287 message_events: Add comment. 2024-12-02 16:41:36 -08:00
Aman Agrawal
3fef305557 message_fetch: Extract part of post message fetch process.
This will be useful to separately call when restoring msg list
from cached msg list data.
2024-12-02 16:41:36 -08:00
Maneesh Shukla
dc70e50643 presence_data: Create new function to fetch data.
This change introduces a new function, fetch_presence_user_setting,
to retrieve presence data of users. The function fetches data for a very
long duration by setting the `history_limit_days` parameter to 365*1000.

Fixes #31039.
2024-12-02 16:32:08 -08:00
Karl Stolley
e3fca21b27 buddy_list: Use opaque hover color for headings. 2024-12-02 16:11:17 -08:00
evykassirer
a6835fc2db buddy_list: Show unsubscribed participants in participants list.
If a participant is unsubscribed, we still want to show them in
the participants list, since users might expect them to be there
anyways. We also already calculate the count including the
unsubscribed participants, so this fixes a bug where the count
could be higher than the list of people.
2024-12-02 13:19:19 -08:00
Aman Agrawal
35ffaff1f6 tusd: Allow user to upload files during preregistration.
Allow user to upload files during preregistration. This will be used
to upload import data.

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2024-12-02 10:21:45 -08:00
Aman Agrawal
2de868487b confirmation: Allow using used confirmation objects if required. 2024-12-02 10:21:03 -08:00
Aman Agrawal
a8d0667b46 preregistration: Add field to track import progress.
We add a field to track user's progress and other details
during the import process.
2024-12-02 10:21:03 -08:00
Lauryn Menard
7a40462aed support: Use datetime for push notification data in remote support. 2024-12-02 10:09:19 -08:00
Shubham Padia
6dcd4c4ca6 stream: Rename function to get defaults for stream permission groups. 2024-12-02 10:05:53 -08:00
Anders Kaseorg
a35addda73 eslint: Switch typescript-eslint to projectService.
This is recommended in typescript-eslint@8.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
d78902fac3 e2e-tests: Move test credentials to a JSON file.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
5fbb60a849 lint: Correct path to ESLint configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
0b52105ebb eslint: Provide empty webpack configuration.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Anders Kaseorg
7344340fe0 tsconfig: Remove *.js exclusion.
This improves the editor experience for *.js, and there’s not a big
performance impact anymore.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 22:14:35 -08:00
Harsh
48200b1adc recent: Fix showing No matches message while loading.
This commit ensures that "No conversations
match your filters." message is not displayed
while Recent conversations is loading
fixes #32503.
2024-12-01 20:56:05 -08:00
Sahil Batra
0d5d305a47 register: Optmize computing can_invite_others_to_realm.
We already have fetched all the groups that the user is
member of, so we can just check if can_invite_users_group
is included in that list of groups like we do for similar
fields like can_create_public_streams, etc.

This helps us in saving a DB query.

Fixes #32408.
2024-12-01 19:33:55 -08:00
Anders Kaseorg
dd3ed187f1 integrations: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 19:33:16 -08:00
Anders Kaseorg
4dcd9b163e integrations: Devirtualize pointless “dispatch” abstraction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-01 19:33:16 -08:00
Shubham Padia
343741f621 stream: Fetch system groups in one query for group setting defaults.
Right now, the number of queries has remained the same, but when we add
more settings in the future, we won't be increasing the number of
queries when iterating over stream permission group settings.
2024-12-01 19:32:22 -08:00