Mark the channel name of the initial channel created during
realm creation for translation.
It doesn't mark the topic names and description for translation
because we are planning to remove these topics and update the
description as a part of improving the onboarding experience.
We no longer create the 'core team' private channel when
a realm is created.
Earlier, "New user announcements" channel was set to the
"core team" channel. Now it is disabled by default.
populate_db still creates the 'core team' channel to
represent a private channel.
The reactions added to messages in the test database are
random in nature, so there is a possibility of any number
of reaction records in the exported user data.
The test now verifies the reaction which was added in the test
itself.
Earlier, the test was assuming the reaction added in the test
is the only record in the exported data.
That would result in a flaky behavior. This commit fixes the
flaky behavior.
The messages populated in the test database are random in nature,
so there is a possibility of any number of messages in
'new_stream_announcements_stream' in 'test_merge_streams'.
Earlier, the test was assuming of exactly one message in that
stream.
That would result in a flaky behavior. This commit fixes the
flaky behavior.
The messages populated in the test database are random in nature,
so there is a possibility of more than one resolved topic
messages returned by 'self.get_and_check_messages()' query
in 'test_get_messages_for_resolved_topics'.
That would result in a flaky behavior. This commit fixes the
flaky behavior.
Since there are no rows to set focus in recent view before initial
fetch, we were falling back to set focus on input filter after
rendering recent view.
Waiting for initial fetch to complete helps us set focus on the
table easily while recent view is also open for user to play with
if the load takes longer.
Fixes#29632.
The issue description explains this well:
We currently recalculate `currently_used_upload_space_bytes` every file
upload, by dint of calling `flush_used_upload_space_cache` on
save/delete, and then immediately calling
`user_profile.realm.currently_used_upload_space_bytes()` in
`notify_attachment_update`. Since this walks the Attachments table,
recalculating this can take seconds in large realms.
Switch this to using a CountStat, so we don't need to walk significant
chunks of the Attachment table when we upload an attachment. This will
also give us a historical daily graph of usage.
The `margin-bottom` was removed for the last element in the preview in
e55f5a1b59 to remove vertical shifts when
toggling preview mode, but it is not needed for image / video previews,
so now `margin-bottom` is not set to 0 for the last inline preview.
We update the existing migration, because any deployment which had
invitations with non-default streams in this state cannot have
proceeded past this migration yet.
This commit updates access_user_group_for_setting
to support setting anonymous user groups for
different settings.
There are some lines without coverage as of this
commit, but the next few commits would add tests
covering those.
This commit fixes the queries to get members and subgroups for
user group objects returned by user_groups_in_realm_serialized
to not include the UserGroup objects which are not linked to a
NamedUserGroup object, since the function only returns data for
NamedUserGroup objects.
The naming `uri` is deprecated while `url` should be used in order to
satisfy URL standards. For this reason, four endpoints are affected:
* The response content of three endpoints `/server_settings`,
`/register` and `/realm` that contain a field `realm_uri` is
changed to `realm_url`.
* In one of the common fields for all mobile push notifications payloads,
`realm_url` field is now added as an alias to `realm_uri`.
For backwards compatibility, we keep the field `realm_uri` and add
an alias `realm_url`.
Co-authored-by: Junyao Chen <junyao.chen@socitydao.org>
When the export is NOT generated by another zulip server,
while importing:
* Set the 'zulip_update_announcements_level' to the latest level
as we don't want to send all the older update messages to them.
* Send a group DM to admins, suggesting them to configure the
stream in order to avoid missing future update messages.
Fixes#29041.
In 61b3c698af we stopped restoring widgets
from the cache, so the only purpose of the cache remaining was to access
the event handler patched onto the widget jquery.
Now instead of the entire jquery object, we cache just the event handler
since that's the only thing we need from the cache, and do not patch it
onto the widget jquery object.
Earlier, we were creating RealmAuditLog with REALM_EXPORTED
event_type when export of public data took place via organization
settings panel.
We were not creating the audit log when the export was executed
via shell i.e './manage.py export'.
This commit creates the audit log in that case too. It will
help during import to distinguish readily between imports
from another Zulip server vs imports from another product.
This saves us the time of shelling out to a new python process,
loading all of Django, and printing one value we could just have read
in-process. It is unclear why we ever did it this way.
Using only EXTERNAL_HOST results in:
```
CRITICAL: Error subscribing to Zulips: Account is not associated with this subdomain
```
Since system bots like the nagios bot are created in
`SYSTEM_BOT_REALM`, default to that subdomain of `EXTERNAL_HOST`.
In #23380, we are changing all occurrences of uri with url in order to
follow the latest URL standard. Previous PRs #25038 and #25045 has
replaced the occurences of uri that has no direct relation with realm.
This commit changes just the model property, which has no API
compatibility concerns.
Use the "/json/messages/flags" instead of "/json/messages/flags/narrow"
when we have fully fetched the current view.
Update messages on the basis of id instead of updating the entire
narrow.
Fixes#28945.
Since the reference for these typeaheads is has a fixed position
unlike say message controls which move on scroll and need to be
repositioned, we can use `fixed` position for typeaheads too so
there is no jumps when user is trying to scroll when a typeahead
is active.
This basically replaces the commit where where we remove `fixed`
as an argument to `Typeahead` library. We can add it later if
any of our typeaheads don't need to be fixed positioned.
When compose box is expanded, typeahead overlfows the top of the window.
We move the typeahead to the bottom of the screen and let
preventOverflow shift it into the visible area.
To better make use of server load when fetching message history for
users, we limit how much history we fetch in the initial loading
experience based on how much time in the organization's message
history it corresponds to.
Co-authored-by: Tim Abbott <tabbott@zulip.com>