This helps avoid confusion with `participant_user_ids`
which is a property of the buddy list and describes
the currently visible participants, whereas
`all_participant_ids` describes all participants,
even those hidden due to search.
Because we regularly change what we want the placeholder
text to be, as the user enters and exits search, it's simpler
to just not use `data-search-results-empty` and set up the
placeholder from the buddy list code directly. Previously we
were trying to sometimes use `data-search-results-empty` and
sometimes set it directly, which is more confusing and complex.
Sometimes we might want to re-fill the screen after collapsing
or uncollapsing a section, so it's better to fill the screen
just once after determining if we should collapse the "other
users" section. Also, this commit removes a call to
`render_section_headers()` because that's always called at the
end of `fill_screen_with_content()`.
We now use new pills UI for public and private channel
creation settings. The UI for web-public channel
creation setting is still a dropdown as we allow only
system groups for that.
The first two are equivalent because they call `closest`
and the last one is directly equivalent. We're making these
changes to aid with the conversion to typescript.
We already have the code to ignore the deactivated groups before
sending the request and show appropriate message. This commit
just adds code to not show them in the typeahead and also not
create its pill if user types the full group name.
Even though we do not show groups that cannot be used as subgroups
in typeahead, user can still type the complete to get the pill
and make the request to the server which currently returns not so
good error message. This commit fixes it to not create the pill for
such cases and hence not making any request to server.
Mark as unread from here was not working in a channel feed when
we don't have all the messages fetched locally since the
channel ID was incorrectly passed as a string.
Copied the correction code from bulk_update_read_flags_for_narrow.
This is a somewhat hacky and fragile fix. Due to the order in which
imports seem to happen, the original ordering breaks
RealmImportExportTest: if one of the `use_s3_backend` tests runs before
test_import_realm, the latter will fail while processing thumbnailing,
as S3UploadBackend ends up leaking and
zerver.worker.thumbnail.upload_backend is still set to S3.
By making that mock.patch the first one that gets entered, and thus the
last one to get cleaned up, we fix the leak and upload_backend is set
back to LocalUploadBackend as it should.
Streams should not be marked as private, and subscribers
of the deactivated stream should not be removed.
Update the confirmation message when archiving a stream.
When clicking on a message from an archived
stream, the `adjusted_terms` may be null since
archived streams are not sent back to the client.
This results in an error for the user.
Function `delete_sub` was exclusively called by `stream_data.delete_sub`.
With the change in the approach where we no longer remove subscriptions
from `stream_info` and `subs_by_stream_id`, the `delete_sub` function is no
longer needed.
Previously, when archiving a stream `delete` function was used to
remove stream from `stream_info`. However, with the current
approach, we don't remove stream instead we use the `set_false`
function to mark streams as false, making the `delete`
function unnecessary.
Stream is simply marked as `archived: true` instead of removing
the stream from `sub_store` and `stream_info`.
A check in `subscribe_myself` is added before subscribing to a
stream.
`is_archived` field is added to the stream and types.
Include a new `archived_channeels` client capability, to allow clients
to access data on archived channels, without breaking
backwards-compatibility for existing clients that don't know how to
handle these.
Also, included `exclude_archived` parameter to `/get-streams`,
which defaults to `true` as basic clients may not be interested
in archived streams.