Commit Graph

53132 Commits

Author SHA1 Message Date
Signior-X f63c1fa639 user docs: Remove right SimpleBar from help and API documentation.
Remove the SimpleBar from the content on /help, /api, and /policies in
favor of the default browser scrollbar.

Fixes #10732.
2023-08-30 15:34:34 -07:00
Karl Stolley 50d8e789cb compose: Prevent undesired link-pasting behavior.
This commit checks for two edge cases where the paste-URL logic
should not apply:

1. On text selections likely already in or adjacent to Markdown
   link syntax
2. Over top of existing links
2023-08-30 15:33:28 -07:00
David Rosa 9ff4e8b82b help: Add mobile instructions to "Create a stream". 2023-08-30 15:32:24 -07:00
David Rosa 0635b89415 help: Update "Create a stream".
- Updates Desktop/Web instructions to follow current help center
  documentation patterns.
- Moves instructions to a Markdown include-block.
2023-08-30 15:32:24 -07:00
Karl Stolley a1a8afa2f7 css_grid: Defensively prevent blowouts by using minmax().
This improves upon a change introduced in #26279. But rather than
setting an `overflow` value, this uses `minmax()` with a 0 minimum
value--pushing back against the default grid minimum column value
of `auto`. The `auto` value will always try to fit the content
into the grid, even if that means wreaking havoc on the grid as
defined.
2023-08-30 15:30:40 -07:00
Alex Vandiver f8636e7d2b iptables: Stop logging on dropped packets.
We never examine these logs, and it fills dmesg.  We have flow logging at the AWS stack layer.
2023-08-30 15:29:01 -07:00
Anders Kaseorg 792a44b382 push_notifications: Fix logging.exception misuse.
logging.exception should only be called from an exception handler.
https://docs.python.org/3/library/logging.html#logging.exception

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-08-30 12:45:45 -07:00
Anders Kaseorg e1ea737ee2 version: Add missing PROVISION_VERSION bump for greenlet upgrade.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-08-30 12:17:36 -07:00
Alex Vandiver 2e760f18ac requirements: Use greenlet>=3.0.0a1 to fix uwsgi segfault.
Pull in the fix for python-greenlet/greenlet#330.
2023-08-30 11:58:30 -07:00
Alex Vandiver 7787fe3f49 push_notifications: Send all APNS devices in parallel.
Instead of starting up one event loop for every device send, use
asyncio.gather to send to all of a user's devices at once.
2023-08-30 11:56:52 -07:00
Alex Vandiver 69825cd54c push_notifications: Drop error messages from failure to send.
We handle, and possibly log, these errors ourselves.
2023-08-30 11:56:52 -07:00
Alex Vandiver 733c6da298 push_notifications: Upgrade aioapns. 2023-08-30 11:56:52 -07:00
Alex Vandiver 168e1d5f85 send_email: Provide the realm and string_id, for ease of "if" logic. 2023-08-30 11:54:28 -07:00
Alex Vandiver c2c67a7640 send_email: Broaden type of context dict.
jinja2 can take objects and other data structures.
2023-08-30 11:54:28 -07:00
David Rosa 38a8c3df17 help: Add mobile instructions to "Unsubscribe from a stream".
- Documents unsubscribing via long-press menu, all streams, and
  stream settings menu.
2023-08-30 11:30:53 -07:00
David Rosa 9e9b1562e5 help: Update "Unsubscribe from a stream".
- Updates Desktop/web instructions to follow current help center
  documentation patterns.
- Adds instructions to unsubscribe from a stream via the stream settings
  panel.
2023-08-30 11:30:53 -07:00
Akshat 3977514dec fenced_code: Enable code-highlighting without language markers.
The 'startinline' option is utilized in the `CodeHilite` instantiation
to indicate that the provided PHP code snippet should be highlighted
even if it doesn't start with the opening tag or marker of the
associated programming language (which will rarely be the case in
Zulip, since one discusses a section of a file much more often than a
whole file).

Fixes: https://chat.zulip.org/#narrow/stream/137-feedback/topic/php.20syntax.20highlighting.20should.20not.20require.20.60.3C.3Fphp.60.

Signed-off-by: Akshat <akshat25iiit@gmail.com>
2023-08-29 18:16:11 -07:00
Daniil Fadeev 198ef43ced left_sidebar: Fix the layout for filter names that are long. 2023-08-29 17:28:05 -07:00
Karl Stolley efa3c4a2c6 scroll: Correct element checks before activation. 2023-08-29 17:25:41 -07:00
Alex Vandiver 110677d441 corporate: We have switched to DMs, from PMs. 2023-08-29 17:13:10 -07:00
Prakhar Pratyush 46446d0e1d test_push_notifications: Add a test for FOLLOWED_TOPIC_PUSH trigger.
This commit adds a test to verify the payload
'get_message_payload_apns' returns when the notification trigger is
'NotificationTriggers.FOLLOWED_TOPIC_PUSH'.
2023-08-29 17:12:21 -07:00
Prakhar Pratyush 6dc3b1a052 push_notifications: Return a common subtitle for wildcard mentions.
This commit updates the 'get_apns_alert_subtitle' function to
return a common subtitle, i.e., "{full_name} mentioned everyone:"
for wildcard mentions.

The triggers for the stream or topic wildcard mentions include:
* NotificationTriggers.TOPIC_WILDCARD_MENTION_IN_FOLLOWED_TOPIC
* NotificationTriggers.STREAM_WILDCARD_MENTION_IN_FOLLOWED_TOPIC
* NotificationTriggers.TOPIC_WILDCARD_MENTION
* NotificationTriggers.STREAM_WILDCARD_MENTION
2023-08-29 17:12:21 -07:00
Prakhar Pratyush e2c9b283f3 get_apns_alert_subtitle: Remove the stale 'user_profile' parameter.
This commit removes the 'user_profile' parameter that wasn't
getting used.

This should have been removed in ce6f6a3.
2023-08-29 17:12:21 -07:00
Lauryn Menard 8230a21163 api-changelog: Update feature level 119 entry for clarity. 2023-08-29 17:11:13 -07:00
Danny Su 2414ddd2d4 compose: Verify request payload in Zoom meeting creation test
Verify that Zoom meeting creation logic sends the expected request payload for
configuring host_video and participant video.
2023-08-29 17:09:43 -07:00
Danny Su 66b9c06de6 compose: Add support for Zoom audio call
This PR implements the audio call feature for Zoom. This is done by explicitly
telling Zoom to create a meeting where the host's video and participants' video
are off by default.

Another key change is that when creating a video call, the host's and
participants' video will be on by default. The old code doesn't specify that
setting, so meetings actually start with video being off. This new behavior has
less work for users to do. They don't have to turn on video when joining a call
advertised as "video call". It still respects users' preferences because they
can still configure their own personal setting that overrides the meeting
defaults.

The Zoom API documentation can be found at
https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingCreate

Fixes #26549.
2023-08-28 18:32:20 -07:00
David 75a654b9ab
help: Update links to "Edit a message" and "Delete a message".
The series including 0349152f0f split
this page into two smaller pages.
2023-08-28 18:09:41 -07:00
Lauryn Menard 965a25d91b api-docs: Clean up text in various parts of `unread_msgs` object.
Adds a Changes note for when `other_user_id` was added to the `pms`
object.

Changes a few uses of "you" to be "current user" instead.

Clarifies type of direct message (one-on-one or group) and that
messages are unread messages.
2023-08-28 12:33:02 -07:00
Lauryn Menard 0c9fef2444 api-docs: Fix incorrect documentation of subfield in `unread_msgs`.
Fixes the field in both the pms and huddles objects to be correctly
documented as `unread_message_ids`, instead of `message_ids`.

The documentation of the similar field in the stream object of
`unread_msgs` was corrected in commit 27ddb554fb.
2023-08-28 12:33:02 -07:00
Alex Vandiver e8c8544028 nginx: Do not forward X-amz-cf-id header to S3.
All `X-amz-*` headers must be included in the signed request to S3;
since Django did not take those headers into account (it constructed a
request from scratch, while nginx's request inherits them from the
end-user's request), the proxied request fails to be signed correctly.

Strip off the `X-amz-cf-id` header added by CloudFront.  While we
would ideally strip off all `X-amz-*` headers, this requires a
third-party module[^1].

[^1]: https://github.com/openresty/headers-more-nginx-module#more_clear_input_headers
2023-08-28 12:30:14 -07:00
neiljp (Neil Pilgrim) 4fc1bac473 api-docs: Fix formatting on realm_user in enter_sends from register. 2023-08-28 10:46:53 -07:00
neiljp (Neil Pilgrim) 15cc63174a api-docs: Mark giphy_rating_options requires realm in fetch_event_types.
Noted absent by Chris Bobbe at:
https://chat.zulip.org/#narrow/stream/378-api-design/topic/.60giphy_rating_options.60.20in.20.2Fregister.20response/near/1282161

Confirmed by Tim Abbott in the same topic, and reconciled with zerver/lib/events.py.
2023-08-28 10:46:53 -07:00
neiljp (Neil Pilgrim) 942d702830 api-changelog: Fix formatting of feature level 201 entry. 2023-08-28 10:46:53 -07:00
neiljp (Neil Pilgrim) 53da9ef072 api-changelog: Clarify change in behavior at feature level 152.
The change in behavior suggesting the need for this clarification is
summarized below, as discussed in the following topic:
https://chat.zulip.org/#narrow/stream/378-api-design/topic/update_message.20default.20notifications
The new text is as suggested by Greg Price.

The change at feature level 152 made the moving of topics within and
between streams more consistent, by applying the optional parameters
introduced for the latter to both cases (`send_notification_to_[new|old]_thread`).

The default for the `old` notification value was changed to `false` at
this point, but the equivalent `new` value was not. This introduced a
change in behavior for existing clients of the API when moving topics
within streams, which now always produce a notification message by
default.

The improved consistency and default behavior for new API clients were
considered primary factors at the time of this change, overriding
concerns over backwards compatbility.
2023-08-28 10:46:53 -07:00
neiljp (Neil Pilgrim) f259e85924 api-changelog: Add missing register change to feature level 48 entry.
This corrects the entry with the addition of the `muted_users` field at
level 48, originally added in 3bfcaa3968.
2023-08-28 10:46:53 -07:00
Lalit Kumar Singh 4f3a971e64 ts: Migrate `channel.js` module to TypeScript. 2023-08-28 09:19:07 -07:00
Yogesh Sirsat f3830a3e1e settings_streams: Delete redundant uses of "update_choice_delete_btn".
It is unnecessory to make use of `update_choice_delete_btn` since
we disable the dialog submit button in case no default streams
selected in Org settings > Default streams > Add stream.

This commit is a follow-up to PR: #22903
2023-08-28 08:52:43 -07:00
Yogesh Sirsat a729c95ada custom_profile_fields: Fix empty field choices issue of select field.
While editing select type profile field, if we submit empty or zero
choices it fails silently, current implementation for this issue does
not work for some cases, and this commit will fix that.

This will disable dialog submit button in case of empty field choices.

Also removing code of all calls making to `update_choice_delete_btn`
as that function have no more use-case for empty field choices, still
keeping the function because it gets used in `settings_streams.js`.

Co-authored-by: Palash Baderia <palash.baderia@outlook.com>
2023-08-28 08:52:43 -07:00
David Rosa 54044a1045 help: Document keyboard shortcut for starring messages.
Fixes: #26573.
2023-08-28 08:49:49 -07:00
David Rosa 7b2d5df3dd help: Document keyboard shortcut for viewing message edit history.
Fixes: #26573.
2023-08-28 08:49:49 -07:00
Sahil Batra ada2991f1c users: Send stream creation/deletion events on role change.
We now send stream creation and stream deletion events on
changing a user's role because a user can gain or lose
access to some streams on changing their role.
2023-08-25 12:56:36 -07:00
Sahil Batra 5e3c39ea4f streams: Extract some code out of do_get_streams in a new function.
This commit extracts the code which queries the required streams
to a new function "get_user_streams". The new functions returns
the list of "Stream" object and not dictionaries and then
do_get_streams function converts it into list of dictionaries.

This change is important because we would use the new function
in further commit where we want list of "Stream" objects and
not list of dictionaries.
2023-08-25 12:56:36 -07:00
Sahil Batra 5e1eb3cd44 events: Fix applying stream creation events in apply_event.
There was a bug in apply_event code where only a stream which
is not private is added to the "never_subscribed" data after
a stream creation event. Instead, it should be added to the
"never_subscribed" data irrespective of permission policy of
the stream as we already send stream creation events only to
those users who can access the stream. Due to the current
bug, private streams were not being added to "never_subscribed"
data in apply_event for admins as well. This commit fixes it
and also makes sure the "never_subscribed" list is sorted
which was not done before and was also a bug.

The bugs mentioned above were unnoticed as the tests did not
cover these cases and this commit also adds tests for those
cases.
2023-08-25 12:56:36 -07:00
Sahil Batra b92af18928 register: Include web-public streams in "streams" field of response.
The "streams" field in "/register" response did not include web-public
streams for non-admin users but the data for those are eventually
included in the subscriptions data sent using "subscriptions",
"unsubscribed" and "never_subscribed" fields.

This commit adds code to include the web-public streams in "streams"
field as well as everyone can access those and will make the "streams"
data complete.
2023-08-25 12:56:36 -07:00
Daniil Fadeev 53e081ae29 popover_menus: Create an API to render popovers as a centered overlay.
This commit lets us render popovers centered on the screen with a
background overlay. It's the same thing we did with Bootstrap
popovers, but optimized for use with Tippy.
2023-08-25 12:29:36 -07:00
Daniil Fadeev 32d8ae16d2 popover_menus: Extract toggle_popover_menu. 2023-08-25 12:29:36 -07:00
Daniil Fadeev f3641b8369 popovers: Move color style declaration to a better place. 2023-08-25 12:29:36 -07:00
Alex Vandiver 5ca15a36ba version: Update version and changelog after 7.3 release. 2023-08-25 18:21:10 +00:00
Mateusz Mandera f3a3047484 bulk_access_messages_expect_usermessage: Fix function name and comments.
The name and docstring were just wrong, having a UserMessage row isn't
sufficient for having message access and is actually only relevant in a
private stream with private history. The function is only used in a
single place anyway, in bulk_access_messages.

The comment mentioning this function in handle_remove_push_notification
can be tweaked to just not mention any function specifically and just
say why we're not checking message access.
2023-08-25 14:10:27 -04:00
Mateusz Mandera 91eef4d77f delete_in_topic: Add comment explaining the access logic. 2023-08-25 14:10:27 -04:00