Commit Graph

56373 Commits

Author SHA1 Message Date
David Rosa d29cd04387 integrations: Create incoming webhook for GitHub Sponsors.
Creates an incoming webhook integration for Github Sponsors. The
main use case is getting notifications when new sponsors sign up.

Fixes #18320.
2024-02-07 09:52:03 -08:00
Tim Abbott ea89a4c6f7 puppeteer: Disable flaky administrative UI test. 2024-02-07 09:45:27 -08:00
Tim Abbott d015a8ca52 typing: Pass the type parameter in typing requests.
Not passing this parameter is a deprecated way to do things.
2024-02-07 09:12:49 -08:00
Varun Singh e213d9505b typing: Convert module to TypeScript. 2024-02-07 09:12:49 -08:00
Varun Singh 391e2a8e01 typing_status: Use TypeScript unions for 'Recipient' type.
Typing 'Recipient' as union of 'stream' and 'direct' message type will help with upcoming type inference.
2024-02-07 09:12:49 -08:00
Varun Singh b64a9d6ae0 page_params: Add typing notifications constants to type. 2024-02-07 09:12:49 -08:00
Varun Singh 94558478df scheduled_messages_feed_ui: Convert module to TypeScript. 2024-02-06 22:25:55 -08:00
Varun Singh f0b8cc7865 scheduled_messages_feed_ui: Refactor to avoid duplicate function calls.
While this logic might seem to be different,
util.same_stream_and_topic would always return false when passed a
topic of undefined.
2024-02-06 22:25:55 -08:00
Varun Singh fc86aca769 scheduled_messages: Make ScheduledMessage type more precise.
Typing 'ScheduledMessage' as union of 'private' and 'stream' scheduled
message types will help with upcoming type inference.
2024-02-06 22:25:55 -08:00
Varun Singh 3d23b39793 scheduled_messages_feed_ui: Fix false/empty array type confusion.
This looks to be a mistake resulting from moving this line out of the
filtering loop just below.
2024-02-06 22:25:55 -08:00
Alex Vandiver 927660a7b6 kandra: Remove munin. 2024-02-06 21:34:56 -08:00
Alex Vandiver 96d237d57e kandra: Pull in known_hosts to the nagios user.
This prevents failures when new hosts are initially added to the
configuration.
2024-02-07 00:02:40 -05:00
Alex Vandiver 2cbd9c2a47 kandra: Update default chrony configuration for 22.04. 2024-02-07 00:02:32 -05:00
Prakhar Pratyush 2055dfa83e support: Add support to configure fixed-price plan with pay-by-invoice.
* Manually create & send invoice
* Configure a fixed-price plan with sent invoice-id.
* When customer pays, upgrade them to concerned plan.
2024-02-06 18:43:23 -08:00
Prakhar Pratyush 79a1b3b80e billing: Show annual data for fixed-price plan, by default.
On /upgrade page, we show annual schedule & price for a
fixed-price plan, by default.

This also acts as a prep commit for fixed-price plan
with pay-by-invoice collection method as we only offer
annual plan in such case. So, annual data is shown by default
on /upgrade page.
2024-02-06 18:43:23 -08:00
shashank-23002 3bf04ffab5 messages: Update new user signup notification.
Fixes: #28834.
2024-02-06 18:41:05 -08:00
David Rosa 8e92b54df1 help: Update external links to "Bots overview" help center page.
The page was renamed and thus this will avoid an unnecessary redirect.
2024-02-06 18:22:57 -08:00
David Rosa 8bddaf8df6 help: Fix "contact us" link in the footer of documentation pages. 2024-02-06 18:22:57 -08:00
Tim Abbott c3208c73a1 docs: Update GSoC page based on feedback. 2024-02-06 18:18:07 -08:00
Lauryn Menard 6818a09123 remote-support: Add server mobile users without a remote realm.
Adds a count for mobile users registered for the remote server
with a RemotePushDeviceToken that does not have an associated
remote realm, which was a recently added field.

If the remote server is pre-8.0 and does not have remote realms,
then only the total mobile user count is displayed, as the count
for uncatagorized mobile users would be equal to the total mobile
user count.
2024-02-06 18:09:45 -08:00
Lauryn Menard 4f04f9f1f0 remote-support: Show datetime of last mobile push forwarded count.
This is useful for support admin to know if push notifications for
the remote server or realm have recently been logged/counted.
2024-02-06 18:09:45 -08:00
Lauryn Menard 5479053a9f remote-support: Add server data for last audit log update time.
This is useful in the support view in case the audit log data is
stale and user counts are not updated for billing.

Also, renames formatting function for optional datetimes that is
used in the support and activity views/charts. And instead of
showing these datetime strings in the eastern US timezone, we
now show and label them as UTC.
2024-02-06 18:09:45 -08:00
Tim Abbott 51542eb55e stats: Fix bad query plan for remote counts.
We don't have an index on `(server_id, id)`, and in any case, we have
a stronger guarantee that `remote_id` is time-sorted, from the
construction of the analytics tables, than that the `id`s given these
entries when uploaded are time-sorted.
2024-02-06 18:06:17 -08:00
Alex Vandiver b23d90ed62 puppet: Rename puppet/zulip_ops to puppet/kandra.
This makes for easier tab-completion, and also is a bit more explicit
about the expected consumer.
2024-02-06 17:56:27 -08:00
Tim Abbott f4ad102d39 narrow_state: Add pm_ids_set helper.
This provides a more easy to work with model of which users, if any,
are involved in the current DM conversation, if any.
2024-02-06 14:44:09 -08:00
Tim Abbott 772ed724c0 peer_data: Extend get_subscriber_count to allow excluding bots.
The new buddy list code path will want to be able to do this.
2024-02-06 14:44:09 -08:00
evykassirer a46c4f7b7e people: Gracefully fail for invalid users in user_is_bot.
Many of these code paths largely expect it to be a valid user ID, so
we could raise an exception if the user ID is invalid, but probably
gracefully proceeding is reasonable for the callers.
2024-02-06 14:44:09 -08:00
Alex Vandiver ccc106dca3 puppet: Add redis host to ~redistunnel/.ssh/known_hosts. 2024-02-06 11:34:09 -08:00
Alex Vandiver aaf3eb514d puppet: Allow controlling known_hosts.
Note that this uses `ssh-keyscan` to write in the currently-observed
host fingerprint; if DNS or network is untrusted during initial puppet
apply, this can allow attackers to write their own host key, obviating
the utility of known_hosts.

We do not view this as a likely attack mechanism, since in our
deployment the network and DNS is almost certainly trusted, and if
not, the timing attack to catch only initial configuration is likely
impossible.
2024-02-06 11:34:09 -08:00
Prakhar Pratyush c54fa91f1a do_send_messages: Remove the stale 'email_gateway' parameter.
This commit removes the stale 'email_gateway' parameter
from 'do_send_messages' function.

This should have been removed in 6c473ed75f,
when the call to 'build_message_send_dict' was removed
from 'do_send_messages'.
2024-02-05 23:19:13 -08:00
Tim Abbott f55ee266b7 message_list_view: Ensure render window IDs are integers.
The previous logic threw confusing exceptions if, during
testing/debugging, one picked an odd render window size.
2024-02-05 23:17:43 -08:00
Tim Abbott a8698c08ca navigate: Correct handling of limited fetched content.
This correctly avoids pageup/pagedown scrolling past already rendered
content, while also always making progress, which the previous logic
introduced in d8ec141de2 might do, at
least in degenerate cases with very small render windows.

I'm not sure this change has any effect in practice with current
render window values, but it does fix a bug if I set the maximum
render window size to 20.
2024-02-05 23:17:43 -08:00
Tim Abbott b9af5ce86e unread: Fix process_visible race with fetching.
The previous batch of improvements to this code path in
6562ea94e4 introduced a race bug where:

- You navigate to a narrowed view; Zulip renders cached data from
  `all_messages_data` that we know is current, but
  `fetch_status.has_found_newest` is initialized to `false`
  nonetheless.

- The bottom is visible, triggering the check for whether the view
  should be marked as read.

- `fetch_status.has_found_newest` is still `false`, and so we
  incorrectly refuse to mark as read.

- We finish fetching data from the server, do the background rerender
  for that (with no changes), but that doesn't trigger a re-check for
  whether the bottom is visible.

There's several ways to address this, but most correct to me is to not
check fetch_status in this particular code path.

The same reasoning applies to the navigate.js call sites.
2024-02-05 23:17:43 -08:00
Tim Abbott b8562bf7b4 docs: Update main GSoC page. 2024-02-05 17:51:23 -08:00
Anders Kaseorg 029e765e20 openapi: Validate real requests and responses, not fictional mocks.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 5cac872e4b openapi: Get parameters from requestBody too.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg a67d1b57b9 openapi: Use Parameter class for generating curl examples.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 131b230e2b openapi: Represent OpenAPI parameters with a Parameter class.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 0cee3bee00 openapi: Remove confusing check for 200 responses.
This error message didn’t make sense for the check as written, and our
OpenAPI document already provides the expected format for our 200
responses.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg bb699f7ee3 test_openapi: Provide missing defs_mapping argument.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 0514f92bdb openapi: Loosen anchor parameter specification to string.
Real requests would not validate against the previous version.  There
seems to be no consistent way to determine whether a string parameter
should be coerced to an integer for validation against an allOf
schema (which works at the level of JSON objects, not strings).

See also https://github.com/python-openapi/openapi-core/issues/698.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 0dd92d2116 test_classes: Add Content-Type header to empty DELETE/POST bodies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg a356ec7011 test_classes: Default client_post to application/x-www-form-urlencoded.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg d9f2f23c6a requirements: Upgrade to openapi-core pre-release.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
Anders Kaseorg 41f253774d Revert "zproject: Prevent having exactly 17/18 middlewares, for Python 3.11 bug."
This reverts commit cf0b803d50.
2024-02-05 19:57:21 -05:00
Anders Kaseorg 4f27381ebc ci: Disable coverage on Debian 12.
This is probably a more effective workaround for
https://github.com/python/cpython/issues/106092.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-05 19:57:21 -05:00
roanster007 49e3e6da06 timerender: Fix get_timestamp_for_flatpickr when no parameter passed.
Previously, when no parameter was passed to the get_timestamp_for_
flatpickr method, it would result in an uncaught exception. This is
breaking the "Add global time" of compose bar.

This can be avoided by doing an early return of current time to hour
in case no string is passed.
2024-02-05 12:33:39 -08:00
roanster007 d971b36026 timerender: Extract get_current_time_to_hour helper.
We will reuse this in the next commit.
2024-02-05 12:33:13 -08:00
Alex Vandiver fe1fd30a58 puppet: Create redistunnel group.
This was left off of 1fe5e7c7da.
2024-02-05 12:15:15 -08:00
Aman Agrawal 37b0f59200 reactions: Rename `get_reaction_section`.
We pluralize it to indicate that it can return multiple row from
multiple lists / rows.
2024-02-05 11:06:46 -08:00