The default channels checkbox only exists in DOM if there are default
channels in the realm, so we should make sure that we check whether
there are default channels in the realm before accessing the
checkbox element in set_streams_to_join_visibility.
Reproducer:
* Have some unreads in the Combined feed view.
* Scroll up and select a message that was not part of initial fetch.
* Reload.
* Go a another narrow.
* Come back to combined feed to find your at a random message. This
message is actually last message of the current fetch of
combined feed view which was returned via `first_unread_message_id`.
Some we didn't have a check for if topic is muted here which
resulted in combined feed trying to navigate user to muted
unread message if it was the first unread in the narrow.
The documentation Creates a shared UserStatus schema that's used for
the return value of this new endpoint and for the existing user_status
objects returned by the register queue endpoint.
Co-authored-by: Suyash Vardhan Mathur <suyash.mathur@research.iiit.ac.in>
Fixes#19079.
This commit updates code, majorly in tests, to use
setting values from enums instead of directly using
the constants defined in Realm.
We still have those constants defined Realm as they
are used in a couple of places where the same code
is used for different settings. These will be
handled later.
We now check if the row exists in the current view, and only then do we
process the submessages in it, instead of letting `Error: Failed to
do_process_submessages` happen.
In the activity and support views, we want to see the annual
revenue for fixed price plans. While on billing pages, we do
not display this information as these plans are renegotiated
annually.
Adds get_annual_recurring_revenue_for_support_data function
to BillingSession class, so that we can get the fixed price
plan data for these views without changing the logic for
what is displayed on the billing pages.
This commit extracts the method to create and update message
lists in the narrow. This is particularly useful in cases when we
need to update the narrow and view with our own message lists.
This is a preparatory commit to #30114, since it involves
creating a new message list from the messages fetched,
which may be of a different narrow from that of the
initial filter, and updating the view and narrow with it.
This commit fixes comment about subscribing to default streams
in set_up_streams_for_new_human_user to explain the current
logic after changes in 69ba580a54.
Adds a link to the stripe customer dashboard if the Customer
object for an active plan has a stripe_customer_id. If there
is no stripe ID to link to, then the icon is shown without
a link, which is the case for remote server/realm sponsorships
and legacy plans.
This commit fixes the bug when updating
"Restrict email domains of new users?" setting by
adding data-setting-widget-type attribute to the select
element as get_input_element_value now expects every
element to have that attribute after 64c8262eaf.
Due to this change, we also need to update the code in
populate_data_for_request function to not send invalid
parameter in the request. This change resulted in some
refactoring which now helps in not passing in the
"disallow_disposable_email_addresses" and
"email_restricted_to_domains" when these fields are
not changed.
This commit fixes the bug when updating realm default
language setting by adding data-setting-widget-type
attribute to the relevant element with "prop-element"
class as get_input_element_value now expects every
element passed to it to have that attr after 64c8262eaf.
As a result we can now remove the code from
get_complete_data_for_subsection to handle realm
default language and just let get_input_element_value
handle it and it also helps in passing the parameter
unnecessary to request when the setting is not changed.
This commit solves the bug for user notification batching
setting which was introduced during the typescript migration
of settings_components.js due to assertion error in
get_input_element_value.
In e726012244, we removed the
@transaction.atomic decorator from the function
'bulk_set_user_topic_visibility_policy_in_database'.
We should keep it to avoid adding it to the caller
of this function, when reused in the future.
Since the docker macOS setup doesn't work without this, it makes
sense for it to be just part of the setup instead of a thing
they fix after running into failure.
This commits fixes the code which checks group mention permission
to handle anonymous user groups correctly. Basically we were
not checking whether the UserGroup is linked to a NamedUserGroup
and directly accessing named_user_group which results in an
error.
We also update the error messages to include the group name
which has permission to mention the groups since now there
might be a comnbination of groups and users who has permission
to mention the group.
This commit also adds tests to check sending and editing messages
when can_mention_group is set to a anonymous user group.