Commit Graph

18578 Commits

Author SHA1 Message Date
Alex Vandiver ff90e5355f upload: Pass down content-type of realm icon/logo to backend.
This saves having to try to re-derive it from the file extension,
which may be ".original" in some cases.
2024-07-11 07:31:39 -07:00
Alex Vandiver b050c644e3 data_import: Mark downloaded png avatars as image/png.
This means that, when imported, they have the right content-type set
in S3.
2024-07-11 07:31:39 -07:00
Alex Vandiver 51766271a1 data_import: Remove a reference to removed code.
The only use of the code was removed in c685d36821, and the code
itself was removed in 4206e5f00b.
2024-07-11 07:31:39 -07:00
Vector73 a43d8159a9 exceptions: Update DM permission error string. 2024-07-10 18:43:50 -07:00
Prakhar Pratyush d92eb77c98 add_subscriptions_backend: Add 'transaction.atomic' decorator.
This commit adds an 'transaction.atomic' decorator to the
'add_subscriptions_backend' view thus making the db operations
within the view atomic and helps to avoid race between events sent.

In tests where we make POST requests to this view, we have
wrapped the API calls with a transaction.atomic() context
manager. It helps us with NOT rolling back the entire test
transaction due to error responses.
2024-07-10 10:50:37 -07:00
Prakhar Pratyush 9c614531fb test_subs: Use 'common_subscribe_to_streams' helper function.
In 'test_subs' we were making POST request to add
subscrption using 'self.api_post'.

This commit updates the code to use the test helper
function 'common_subscribe_to_streams' instead.

This prep commit will also help us to avoid adding
'transaction.atomic' context manager to these API calls
individually in the case of error response in the next commit.
2024-07-10 10:50:37 -07:00
Tim Abbott c9af4d571b onboarding: Fix whitespace for code block examples. 2024-07-09 16:42:23 -07:00
Lauryn Menard 53c575d8cb integration-docs: Update Linear for new doc format.
Part of #29592.
2024-07-09 13:41:06 -07:00
Lauryn Menard 0fa9b94480 integration-docs: Update Lidarr for new doc format.
Part of #29592.
2024-07-09 13:41:06 -07:00
Lauryn Menard 5c7ad8be12 integration-docs: Update Librato for new doc format.
Part of #29592.
2024-07-09 13:41:06 -07:00
Lauryn Menard bd9a10cfbb integration-docs: Update Jira for new doc format.
Part of #29592.
2024-07-09 13:41:06 -07:00
Lauryn Menard 95b74a7bfb integration-docs: Update Intercom for new doc format.
Part of #29592.
2024-07-09 13:41:06 -07:00
Alya Abbott b6e2a1b50d onboarding: Update Welcome Bot's responses to commands. 2024-07-09 13:08:02 -07:00
codewithnick b926ae0904 onboarding: Modify message that welcome bot does not understand.
Previously the bot sent bot commands whenever an undefined message
was sent by the user. This commit intends to fix the problem so that
the bot will only respond to the first message it does not understand
and not reply to any future undefined messages.

Fixes part of #30049.
2024-07-09 13:08:02 -07:00
codewithnick 4b79a77427 onboarding: Change default reply message of welcome bot.
The reply given by welcome bot when it does not understand a message,
sent by the user is changed, so that the bot is more clear to the user.

Fixes part of #30049.
2024-07-09 13:08:02 -07:00
codewithnick e41fda78d4 onboarding: Remove welcome bot message.
The previous message that welcome bot sent with
the bot commands has been removed in order to be more
clear and concise to the user. Previously weclome bot
also sent bot commands in intial message, this commit
intends to remove those commands.

Fixes part of #30049.
2024-07-09 13:08:02 -07:00
Vector73 121043b6f2 settings: Remove private_message_policy setting.
Removes `private_message_policy` field from both the API and
the backend.
2024-07-08 19:34:17 -07:00
Vector73 6098c2cebe settings: Add two realm settings to restrict direct messages.
Fixes #24467.
2024-07-08 19:34:17 -07:00
Vector73 318d3e3cca user_groups: Add `is_any_user_in_group` function in `user_groups.py`. 2024-07-08 19:34:17 -07:00
PieterCK 374210fe7b integration-docs: Update Groove for new doc format.
Part of #29592.
2024-07-08 16:29:33 -07:00
PieterCK 3e83de7d5a integration-docs: Update Gosquared for new doc format.
Part of #29592.
2024-07-08 16:29:33 -07:00
PieterCK 58b32a09a8 integration-docs: Update Gogs for new doc format.
Part of #29592.
2024-07-08 16:29:33 -07:00
PieterCK 98f44262df integration-docs: Update Gitea for new doc format.
Part of #29592.
2024-07-08 16:29:33 -07:00
adnan-td c1421f0847 integration-docs: Update IFTTT for new doc format.
Part of #29592.
2024-07-08 16:29:02 -07:00
adnan-td 928c84233f integration-docs: Update HelloSign for new doc format.
Part of #29592.
2024-07-08 16:29:02 -07:00
adnan-td a35c9795fa integration-docs: Update Hello World for new doc format.
Part of #29592.
2024-07-08 16:29:02 -07:00
adnan-td 6846d2a520 integration-docs: Update Heroku for new doc format.
Part of #29592.
2024-07-08 16:29:02 -07:00
adnan-td a34e50bbae integration-docs: Update Insping for new doc format.
Part of #29592.
2024-07-08 16:29:02 -07:00
Niloth P d763131fde integration-docs: Update Updown for new doc format.
Part of zulip#29592.
2024-07-08 16:28:24 -07:00
Niloth P 4759b6aed7 integration-docs: Update UptimeRobot for new doc format.
Part of zulip#29592.
2024-07-08 16:28:24 -07:00
Niloth P 9c520ae23f integration-docs: Update Github Sponsors for new doc format.
Part of zulip#29592.
2024-07-08 16:28:24 -07:00
Niloth P b7f263cd5c integration-docs: Update Github for new doc format.
Part of zulip#29592.
2024-07-08 16:28:24 -07:00
bedo 88a0a3061e corporate-upgrade: Migrate to @typed_endpoint.
migrate the following endpoints from @has_request_variables
to @typed_endpoint :

- upgrade()
- remote_realm_upgrade()
- upgrade_page()
- remote_server_upgrade()
2024-07-08 16:14:57 -07:00
Lauryn Menard fb3ec350c7 help-settings-links: Fix for new invitations section in users tab.
Updates the instructions for `{settings_tab|invitations}` to work
like the deactivated users link, and updates the one article that
currently uses it: `help/invite-new-users.md`.
2024-07-08 13:56:18 -07:00
Aman Agrawal 9fc6b93347 user_settings: Add option to configure channel click behavior.
This commit does not implement the setting's behavior, just the API
change and settings UI.
2024-07-08 13:56:13 -07:00
Lauryn Menard 7e7e6b7ba9 integration-docs: Clarify use of event-filtering-additional-feature.
Using an if block when {!event-filtering-additional-feature.md!}
is used implied that we plan to have this in all webhook doc .md
files.

But, it actually makes sense to only use this macro when the
webhook integration actually supports event filtering.
2024-07-08 13:51:50 -07:00
Prakhar Pratyush 83414db72e settings: Add 'web_navigate_to_sent_message' setting.
In a2ef1d7e93, we made changes so
that when you send a message, your view jumps to the conversation
where you sent it.

For some users it was an improvement, few reported that it
disrupts their workflows.

This prep commit adds a setting which will be used to allow users
to decide whether to automatically go to conversation where they
sent a message.
2024-07-08 13:00:12 -07:00
Prakhar Pratyush 5bb66e6c99 onboarding: Update initial direct message content.
This commit updates the Welcome Bot's initial
direct message content.

We inform about the tracked onboarding messages
via direct message only if it exists.

Fixes #30051.
2024-07-08 10:32:19 -07:00
Alya Abbott 721c44df10 portico: Update quotes on home page. 2024-07-07 22:44:04 -07:00
roanster007 02d0566dc5 refactor: Rename `Huddle` Django model class to `DirectMessageGroup`.
This commit renames the "Huddle" Django model class to
"DirectMessageGroup", while maintaining the same table --
"zerver_huddle".

Fixes part of #28640.
2024-07-07 21:31:30 -07:00
Alex Vandiver 79f858b4b8 upload: Pass bytes to create_attachment.
This will be used to analyze the bytes for image metadata.
2024-07-07 14:40:07 -07:00
Alex Vandiver f97a30f240 upload: Reorder arguments to parallel upload_message_attachment. 2024-07-07 14:40:07 -07:00
Alex Vandiver f52a93bc14 upload: Stop requiring callers pass in the file size.
This can be calculated because we have the contents.
2024-07-07 14:40:07 -07:00
Alex Vandiver 58a9fe9af1 upload: Drop unused parameters to upload_message_attachment. 2024-07-07 14:40:07 -07:00
Alex Vandiver 0a296b2a6e upload: Start storing content-type for new uploads. 2024-07-07 14:40:07 -07:00
Alex Vandiver 45afdc2d35 attachment: Add a nullable content-type.
This will be backfilled in a future commit, to prevent walking the
Attachments more than once.
2024-07-07 14:40:07 -07:00
Alex Vandiver e29a455b2d avatars: Encode version into the filename.
Hash the salt, user-id, and now avatar version into the filename.
This allows the URL contents to be immutable, and thus to be marked as
immutable and cacheable.  Since avatars are served unauthenticated,
hashing with a server-side salt makes the current and past avatars not
enumerable.

This requires plumbing the current (or future) avatar version through
various parts of the upload process.

Since this already requires a full migration of current avatars, also
take the opportunity to fix the missing `.png` on S3 uploads (#12852).

We switch from SHA-1 to SHA-256, but truncate it such that avatar URL
data does not substantially increase in size.

Fixes: #12852.
2024-07-07 14:40:07 -07:00
Alex Vandiver feca9939bb s3: Support setting a cache-control on uploads. 2024-07-07 14:40:07 -07:00
Alex Vandiver 6258817bfd s3: Stop setting empty Content-Disposition header. 2024-07-07 14:40:07 -07:00
Pedro Almeida ddfc2d230f resolve_topic: Prevent incorrect notification during message move.
This commit fixes the bug where the "topic unresolved" notification
is wrongly triggered when moving a message between a resolved and
unresolved topic, except for when the topics have the same name.

To resolve this issue, the commit ensures that resolved/unresolved
notifications are not sent if a message has been moved to a new
topic. This is achieved by comparing the names of the old and new
topics without considering the "resolved prefix".

The commit also accounts for the scenario where `new_topic_name`
has been truncated, indicating that it was resolved and the name
had to change to accommodate the "resolved prefix".

This solution does not try to specially handle the possible case that
a stream has two topics with the same name, even if one is resolved
and another unresolved.

Fixes #29007.
2024-07-07 11:38:14 -07:00