Commit Graph

67140 Commits

Author SHA1 Message Date
Sahil Batra
1d026d9b2b streams: Make sure an anonymous group is used for only one setting.
When creating multiple streams using "POST /users/me/subscriptions"
endpoint, same anonymous group was being used for settings of all
the streams, like if can_subscribe_group was being set to an
anonymous group, all streams created using that endpoint would
use the same anonymous group for can_subscribe_group setting.

Using the same anonymous groups for multiple streams caused
unintended behavior  -

- Changing a setting for one stream also changed it for all
other streams sharing the the same anonymous group, because
eventually the members and subgroups of the group were updated.

- Changing the setting to a named user group failed because
`do_change_stream_permission_group` attempts to delete the
anonymous group during the update. However, deletion of
anonymous group is restricted if they are still referenced
by setting fields.

This commit fixes this so that one anonymous group is used
only for one setting for a single stream.
2025-11-04 11:51:31 -08:00
Shubham Padia
7bd0c37d3c stream_events: Remove remove_deactivated_user_from_all_streams.
We changed the API in 53983c9 so that the server nows sends explicit
peer_remove events before the deactivation event. This means that we
should not have to remove subscribers when receiving a user deactivation
event.

We convert the existing function to raise a blueslip error instead if
our understanding of the system is somehow wrong. That way the error
would be caught instead of slipping through the cracks.
2025-11-04 11:14:59 -08:00
Shubham Padia
3057f4bc6d users: Send peer_remove for archived streams as well on deactivation.
Users are removed from archived streams as well on deactivation. Since
archived stream subscriber list is also visible in channel settings, we
should send peer_remove for it as well.
2025-11-04 11:14:59 -08:00
Prakhar Pratyush
e15edc84c2 desktop_notification: Fix error when message deleted while narrowing.
Earlier:
When a user clicked the desktop notification, but before we finished
processing that click, the message deletion got processed.
It resulted in an error.

This commit fixes the bug by taking the user to the conversation
where the now-deleted message had been prior to deletion -
narrow to the message's near view.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-04 11:03:36 -08:00
Shubham Padia
84bb07a652 user_profile: Fix incorrect keyboard shortcut for send direct messages.
https://chat.zulip.org/#narrow/channel/9-issues/topic/send.20DM.20shortcut.20on.20user.20card/near/2286884
2025-11-04 10:18:54 -08:00
Lauryn Menard
87d08954ff corporate: Update topics for new org creation to include org type. 2025-11-04 08:53:54 -08:00
Alya Abbott
aa0406a07a help: Document image cropping for profile pictures.
Documents changes made in #36038. Also:

- Updates docs follow modern patterns and describe up-to-date UI.
- Sets expectation that users should upload custom avatars.
2025-11-04 08:53:13 -08:00
Alex Vandiver
45fc5c36df puppet: Add a postfix.uninstall flag to allow skipping that step. 2025-11-04 08:35:42 -08:00
Sahil Batra
649a518b19 upload-widget: Add support to crop realm logo, icon and user avatar.
This commit adds code to support cropping realm logo, icon and
user avatar using "ImageEditor" plugin from Uppy.

We do not use Dashboard plugin from Uppy, which is the default
way to allow cropping using Uppy, since we do not want to
show dashboard UI from uppy and we would need some workarounds
which are not trivial to not show the dashboard UI in the upload
workflow.

Fixes part of #24324.
2025-11-03 16:55:04 -08:00
Sahil Batra
fddc9582ff dependencies: Add @uppy/image-editor plugin.
This is needed because we will add support to crop realm
logo, icon and user avatar in further commits.
2025-11-03 16:55:04 -08:00
PieterCK
57c07bcf03 slack_integration: Avoid showing sender username.
The "name" field included in the users.info API response is actually the
senders Slack username, which may be the prefix of their email address.

This updates the integration to use the "real_name" field instead, which
is the senders full name.

Fixes #36090.
2025-11-03 16:42:07 -08:00
PieterCK
141f885861 test_slack_integration: Refactor Slack API mock.
Now, the API response fixtures we use for the Slack integration tests
are based on real responses.
2025-11-03 16:42:07 -08:00
PieterCK
b37d6c7012 integrations: Remove Slack from WEBHOOK_SCREENSHOT_CONFIG.
Slack integration requires Slack API key and will make API calls to
Slack. It'll also trip at `validate_account_and_subdomain` when
receiving Slack calls from a dev environemnt. So this commit removes it
from the tool.
2025-11-03 16:42:07 -08:00
Tim Abbott
9d9fa71fdc integrations: Use commits channel for VCS screenshots. 2025-11-03 16:08:06 -08:00
Niloth P
6eab000c9f integrations: Migrate channel name from Integration to ScreenshotConfig.
Migrate `stream_name` in Integration class to `channel` in
`WebhookScreenshotConfig` and `FixturelessScreenshotConfig` dataclasses.

`stream_name` is being used only when generating screenshots, and
hence belongs better in the screenshot config objects.
In the next commit, the ScreenshotConfig will be added as an Integration
property.
2025-11-03 16:08:06 -08:00
Alya Abbott
ba5340c235 help: Remove outdated "Set up integrations" page.
An updated version of the same content already exists on the
"Integrations overview" page.
2025-11-03 15:54:45 -08:00
Alya Abbott
b9ae4d0597 help: Add guide on moving from Slack. 2025-11-03 15:54:45 -08:00
Alya Abbott
01f4ccc891 help: Wording tweak. 2025-11-03 15:54:45 -08:00
Alya Abbott
b72a3bad90 help: Move content to /include files for reuse. 2025-11-03 15:54:45 -08:00
Alya Abbott
fd8299e1d1 help: Extend guidelines on changing org policies. 2025-11-03 15:54:45 -08:00
Alya Abbott
62a086b60f help: Rearrange and expand user onboarding guidelines. 2025-11-03 15:54:45 -08:00
Alya Abbott
ec2557e93a contributor docs: Explain mechanics of adding a help center page. 2025-11-03 15:54:42 -08:00
Alya Abbott
6e7d595fd9 help: Document clearing of mobile notifications for deleted messages.
Document changes made in #26815.
2025-11-03 15:47:40 -08:00
Prakhar Pratyush
25630f316b push_notification: Improve logged message when apns_context is None.
Earlier, while sending notification if `apns_context=None` - we logged:
"APNs: Dropping a notification because nothing configured. Set
ZULIP_SERVICES_URL (or APNS_CERT_FILE)." which is not accurate for E2EE
case.

For the non-E2EE case it is correct because configuring
ZULIP_SERVICES_URL results in transfering the responsbility to
make API call to APNs to the bouncer. Or they can configure
APNS_CERT_FILE if they want to send directly.

In E2EE case, the `send_e2ee_push_notification_apple` is part of
bouncer so configuring `ZULIP_SERVICES_URL` doesn't help. One needs
to configure either `APNS_TOKEN_KEY_FILE` or `APNS_CERT_FILE`.

Message to log is updated accordingly + severity increased from
DEBUG to ERROR.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-03 15:45:22 -08:00
Prakhar Pratyush
d893496de1 push_notification: Drop notif if ANDROID_FCM_CREDENTIALS_PATH is unset.
If `ANDROID_FCM_CREDENTIALS_PATH` is unset it results in fcm_app=None.
We should log error in this case and return, not doing so will result
in runtime error.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-03 15:45:22 -08:00
Prakhar Pratyush
06501ab208 notification_data: Fix a typo.
Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-03 15:45:22 -08:00
Alex Vandiver
7a640cf91b rocketchat: Emoji can have an ObjectID as an _id. 2025-11-03 13:55:47 -08:00
Alex Vandiver
6c1f3c09ba rocketchat: Write relative paths into emoji metadata. 2025-11-03 13:53:35 -08:00
Shubham Padia
2c40b6168a help: Skip redirect for non-document requests in dev server.
The port redirect is only needed for document requests. When doing it
for all requests, including astro assets, hot reload in dev server
stopped working since the assets could not be resolved on the hot
reload.
2025-11-03 13:52:54 -08:00
Shubham Padia
f76e450282 help: Do not redirect port in case of --only-help-center.
We redirect non /help URLs to port 9991 when help center is running on
9995, since our webapp lives on 9991. When we run `run-dev` with
`--only-help-center` flag, the help center runs directly on port 9991.
2025-11-03 13:52:54 -08:00
Aman Agrawal
cd433349a2 new_registration: Move human verification from popup to inline style.
Placed text just below the "Create organization" button.
Used styling to match "Learn how to import..." above.
Hidden the checkbox after the verification is done.
The verification text is hidden after 2s with a fadeout after 1s delay.

Fixes #36086
2025-11-03 12:19:57 -08:00
Aman Agrawal
dc88b0c9f5 stream_settings_ui: Show correct channel view based on user setting. 2025-11-03 12:18:45 -08:00
Aman Agrawal
5361a081e6 tooltips: Show correct hotkey to narrow to list of channel topics. 2025-11-03 12:18:45 -08:00
Aman Agrawal
b651d46618 narrow_channel_header: Navigate to use set view for channel on click. 2025-11-03 12:18:45 -08:00
Prakhar Pratyush
048b4a6ddf push_notifications: Fix error while sending legacy notification.
While sending push notifications for a user in
realm with `require_e2ee_push_notifications=true` and no
iOS device registered, it resulted in an error.

Also, while sending notif to revoke in realm with
`require_e2ee_push_notifications=true` and no android
device registered, it resulted in an error.

This commit fixes the bug by improving the checks to apply
the redact logic only if android/iOS device is registered
and it's not a remove event.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-03 08:15:18 -08:00
Aman Agrawal
71a89be0a9 inbox: Fix other channel folder name when adding/removing folders. 2025-11-02 14:43:58 -08:00
Karl Stolley
f3194057ae message_row: Use CSS selectors to hide reactions, reminders. 2025-11-02 14:42:24 -08:00
Aman Agrawal
418bd9ff06 reminders_overlay_ui: Allow focusing a specific reminder.
We focus on the reminder in the overlay based on the reminder
message clicked by the user.
2025-11-02 14:42:24 -08:00
Aman Agrawal
9106c85eca messages_overlay_ui: Fix focused row out of view.
Since we were always scrolling to top, the focused row was not
visible.

Fixed by scrolling to the focused element.
2025-11-02 14:42:24 -08:00
Aman Agrawal
afa38e8db9 reminder: Show scheduled reminder info on render message. 2025-11-02 14:42:24 -08:00
Aman Agrawal
c6d720f532 message_store: Provide more information for Message properties.
The inline comments were too brief to expalin how this property
is being used or their intended purpose.
2025-11-02 14:42:24 -08:00
Pratik Chanda
152ad3bf3d hash: Use encoding for slugs in dm narrow hashes.
Slugs in dm urls aren't really passed through url decoding and
shouldn't throw any error currently if hashReplacement aren't enforced.
But we still encode them in this commit to make this consistent.
2025-11-02 14:37:30 -08:00
Aman Agrawal
f86654ba5f slack_import: Ask importer for default email address visibility.
Fixes #34982
2025-11-02 14:36:20 -08:00
Aman Agrawal
4bd9bb1995 create_realm: Extract logic to set default email visibility.
Extract default email address visibility.
This can be used for function argument defaults without
calling the function.
2025-11-02 14:36:20 -08:00
Yogesh
15f8a63b06
settings: Remove hover effect from error message text.
The error message text had an unfortunate hover effect, resulting
from the error container element being inside the main widget element. 

Move the error message element to sit outside the main element; this also 
fixes overflow issues with the error element.

Fixes #17571.
2025-11-02 11:47:30 -08:00
Sahil Batra
ca46e09f41 groups-ui: Live update permissions panel on losing stream access.
This commit adds code to live update the group permissions panel
when user loses access to a stream by removing the stream and its
settings from the UI.
2025-11-02 11:42:36 -08:00
Sahil Batra
2b8fb4e161 user_group_edit: Extract function to hide empty permissions section.
This commit extracts code to hide "Organization permissions",
"Channel permissions" and "User group permissions" headings
in group permissions panel if there are no settings under
these sections and show the empty panel text if group does
not have any assigned permissions.

This new function will help in avoiding duplicate code in next
commit which will add code to live update the permissions
panel when user loses access to a stream.
2025-11-02 11:42:36 -08:00
Sahil Batra
c471c9a0c4 user_group_edit: Pass only group ID to get_edit_container.
get_edit_container only required ID of the user group and
not the whole group object.
2025-11-02 11:42:36 -08:00
Sahil Batra
60be02d453 resize: Fix resizing height of stream settings headers.
When resizing subheader heights to be equal on the left and
right sides, the subheader being resized was set to 1px taller
because height_of included borders in its calculation.

This commit fixes that such that subheaders on both sides are
of same height.
2025-11-02 11:39:57 -08:00
Sahil Batra
c58414b0ca settings: Restructure HTML for stream and groups overlay.
This commit restructures the HTML for stream and group
settings overlay such that we first write all the HTML
for left side and then right side.

This change is important so that focus behavior during
keyboard navigation is correct in narrow screens and
does not move to the elements which are hidden after
we fix it in #26941.

This changes the focus behavior on keyboard navigation
in wide screens where first all of the left panel will
be covered from top to bottom and then the right panel,
but it is fine.
2025-11-02 11:39:57 -08:00