If we `.distinct("delivery_email")` then we must also
`.order_by("delivery_email")`; adc987dc43 added the `.order_by`
call, which broke the newsletter codepath, since it did not contain
the `delivery_email` in the ordering fields.
Add a flag to distinct on emails in `send_custom_email`.
The set of `enable_marketing_emails=True` are those that have opted
into getting marketing newsletter emails -- but we previously limited
further to only those users active in the last month.
Broaden that to "opted in, and either recently active or an owner or
an admin," with the goal of providing information to folks who may
have tried out Zulip in the past.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
This reduces reliance on margin for layout, preventing undesired
space appearing below the footer and better using flexbox to align
elements in the legal area.
Earlier, 'topic' parameter length for
'/users/me/subscriptions/muted_topics' and '/user_topics' endpoints
were not validated before DB operations which resulted in exception:
'DataError: value too long for type character varying(60)'.
This commit adds validation for the topic name length to be
capped at 'max_topic_length' characters.
The doc is updated to suggest clients that the topic name should
have a maximum length of 'max_topic_length'.
Fixes#27796.
That specific piece of the instructions makes it sound like /auth/ is
surely supposed to be there in the URL. But newer versions of Keycloak
don't have it - so mention that explicitly, not to create a wrong
expectation.
Since the latest end time for reported active users on a remote
server is not used to determine if a remote server has current
data for billing purposes, we instead display the last audit log
update datetime for the remote server object.
Removes the note in the remote activity key about the Zulip
version.
Also adds a sum in the total row for mobile push notifications
sent.
We previously allowed adding pills for inaccessible user by typing
the email manually. This commit updates it to handle inaccessible
users like we handle invalid emails.
As the help center article now has detailed instructions to generate
an incoming webhook URL, the integration documentation only needs to
link to that information.
Operand is a confusing name because this
data structure has an attribute *called*
operand. This commit renames references to
this structure to "term", short for "search
term".
Changes the emoji that highlights when a remote realm or server has
an active discount.
Adds a remote server UUID field to the remote server information.
Moves the 'has remote realms' field to be after the Zulip version
information, and adds an extra break there to visually highlight
that field as well as the following 'max monthly messages' field.
- Make `self.write_to_audit_log` support a `background_update:
bool=False` parameter that can be passed when code that might have an
acting user happens to trigger a background update.
- Make `make_end_of_cycle_updates_if_needed` pass that parameter for its
direct audit log writes.
- Audit code that `make_end_of_cycle_updates_if_needed` calls and make
sure those write audit logs this way too.
- Pass the user in the `billing_page` code that had to avoid it as a
workaround:
```
# BUG: This should pass the acting_user; this is just working
# around that make_end_of_cycle_updates_if_needed doesn't do audit
# logging not using the session user properly.
billing_session = RealmBillingSession(user=None, realm=user.realm)
```
For spectators,
page_params.server_typing_started_expiry_period_milliseconds has not
been initialized yet at module load time.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
For spectators,
page_params.server_typing_started_wait_period_milliseconds and
page_params.server_typing_stopped_wait_period_milliseconds have not
been initialized yet at module load time.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
For spectators, page_params.realm_create_public_stream_policy,
page_params.server_web_public_streams_enabled,
page_params.realm_enable_spectator_access have not been initialized
yet at module load time.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
For spectators, page_params.custom_profile_field_types has not been
initialized yet at module load time.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Earlier, the URL directed to live API keys. Updated the URL
to direct to 'test API keys'.
Also explicitly mentioned is to double check that the keys are
'test keys', in case Stripe changes the URL as it did before.
page_params.narrow may be undefined, page_params.server_sentry_dsn may
be null but not undefined, and page_params.user_id may be 0 (for
spectators) but not undefined.
Signed-off-by: Anders Kaseorg <anders@zulip.com>