zulip/zerver/lib
Sahil Batra f197d881ca streams: Fix handling empty groups when computing setting values.
Since "Nobody" and other user-defined empty groups has no
members or subgroups, we need a UserGroup query.

Since we are doing UserGroup query, updated the code to
check whether the setting is set to anonymous group or
not just after doing UserGroup query and not in membership
queries.

Also, added tests to check query count when setting is set
to anonymous group.
2024-11-22 10:48:41 -08:00
..
markdown markdown: Add support for a pretty syntax for message links. 2024-11-04 13:44:40 -08:00
upload slack: Call the correct resize_* function when importing realm icon. 2024-11-08 15:43:18 -08:00
url_preview python: Avoid deprecated cgi module, removed in Python 3.13. 2024-10-22 10:05:01 -07:00
webhooks webhooks: Support filtering GitHub activity from private repositories. 2024-10-31 10:40:28 -07:00
__init__.py
addressee.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
alert_words.py alert_words: Update remove_alert_word codepath to send event on commit. 2024-07-31 22:33:52 -07:00
async_utils.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
attachments.py upload: Explicitly return a bool and the Attachment object. 2024-09-09 12:40:17 -07:00
avatar.py avatar: Add checks to make sure system bot avatar exists. 2024-10-23 10:35:42 -07:00
avatar_hash.py avatars: Encode version into the filename. 2024-07-07 14:40:07 -07:00
bot_config.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
bot_lib.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
bot_storage.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
bulk_create.py audit-log: Move user group event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
cache.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
cache_helpers.py analytics: Pass subgroup=None to improve indexing. 2024-10-02 14:11:44 -04:00
camo.py
ccache.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
compatibility.py ruff: Fix PLR6104 Use `+=` to perform an augmented assignment directly. 2024-07-14 13:49:51 -07:00
context_managers.py ruff: Fix SIM117 Use a single `with` statement with multiple contexts. 2024-07-14 13:48:32 -07:00
create_user.py api: Improve handling of delivery_email in the GET /users/{email} API. 2024-10-08 18:01:49 -07:00
data_types.py ruff: Fix UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`. 2024-07-13 22:28:22 -07:00
db.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
db_connections.py db: Split reset_queries into a new module zerver.lib.db_connections. 2024-04-17 16:49:03 -07:00
debug.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
default_streams.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
dev_ldap_directory.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
digest.py transaction: Add durable=True to outermost transaction.atomic decorator. 2024-11-01 16:41:15 -07:00
display_recipient.py mypy: Remove use of ValuesQuerySet and QuerySetAny. 2024-08-24 17:30:41 -07:00
domains.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
drafts.py drafts: Update do_delete_draft to send event on commit. 2024-08-12 12:16:14 -07:00
email_mirror.py streams: Add 'ChannelEmailAddress' model. 2024-11-21 14:53:28 -08:00
email_mirror_helpers.py streams: Add 'ChannelEmailAddress' model. 2024-11-21 14:53:28 -08:00
email_notifications.py email_notifications: Prevent html2text from mangling Unicode. 2024-10-30 09:49:23 -07:00
email_validation.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
emoji.py emoji: Use a non-predictable filename. 2024-07-12 13:26:47 -07:00
emoji_utils.py
event_schema.py settings: Add `can_invite_users_group` realm setting. 2024-11-20 13:35:05 -08:00
events.py settings: Add `can_invite_users_group` realm setting. 2024-11-20 13:35:05 -08:00
exceptions.py user_groups: Include settings and supergroups in error response. 2024-10-01 09:45:33 -07:00
export.py streams: Add 'ChannelEmailAddress' model. 2024-11-21 14:53:28 -08:00
external_accounts.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
fix_unreads.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
generate_test_data.py ruff: Fix PLR6104 Use `+=` to perform an augmented assignment directly. 2024-07-14 13:49:51 -07:00
github.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
home.py home: Update `client_capabilities` for viewing of archived streams. 2024-10-25 16:06:42 -07:00
html_diff.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
html_to_text.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
i18n.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
import_realm.py import: Replace generic Exception with CommandError. 2024-11-18 18:35:14 -08:00
initial_password.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
integrations.py integrations: Properly pass data-categories as a JSON array. 2024-11-21 14:41:36 -08:00
invites.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
logging_util.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
management.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
mdiff.py tests: Rename the Node tests to *.cjs. 2024-11-13 09:18:56 -08:00
mention.py mention: Do not include deactivated users in group mention data. 2024-10-10 11:37:44 -07:00
message.py import: Add function to normalize messages to import. 2024-11-04 12:22:30 -08:00
message_cache.py edit_history: Remove 'prev_rendered_content_version' field. 2024-08-29 15:37:12 -07:00
migrate.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
mime_types.py emoji: Derive the file extension from a limited set of content-types. 2024-07-12 13:26:47 -07:00
mobile_auth_otp.py ruff: Fix B905 `zip()` without an explicit `strict=` parameter. 2024-07-13 22:28:22 -07:00
muted_users.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
name_restrictions.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
narrow.py narrow_filter: Add negation support for in:home narrow filter. 2024-11-14 15:10:01 -08:00
narrow_helpers.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
narrow_predicate.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
notes.py ruff: Fix FURB180 Use of `metaclass=abc.ABCMeta`. 2024-07-14 13:53:40 -07:00
notification_data.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
onboarding.py create_user: Add 'durable=True' to the outermost transaction. 2024-10-31 09:55:01 -07:00
onboarding_steps.py topic: Add a first-time explanation for "Resolve topic". 2024-10-09 18:12:55 -07:00
outgoing_http.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
outgoing_webhook.py ruff: Fix FURB180 Use of `metaclass=abc.ABCMeta`. 2024-07-14 13:53:40 -07:00
partial.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
per_request_cache.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
presence.py presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
profile.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
push_notifications.py settings: Rework how push notifications service is configured. 2024-07-17 17:14:06 -07:00
pysa.py
query_helpers.py mypy: Remove use of ValuesQuerySet and QuerySetAny. 2024-08-24 17:30:41 -07:00
queue.py ruff: Fix FURB180 Use of `metaclass=abc.ABCMeta`. 2024-07-14 13:53:40 -07:00
rate_limiter.py ruff: Fix B905 `zip()` without an explicit `strict=` parameter. 2024-07-13 22:28:22 -07:00
realm_description.py
realm_icon.py
realm_logo.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
recipient_parsing.py scheduled_messages: Migrate to typed_endpoint. 2024-08-20 10:03:22 -07:00
recipient_users.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
redis_utils.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
remote_server.py settings: Rework how push notifications service is configured. 2024-07-17 17:14:06 -07:00
request.py endpoints: Remove the has_request_variables decorator. 2024-09-05 16:02:12 -07:00
response.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
rest.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
retention.py custom_check: Add rule to avoid creating savepoints. 2024-11-21 14:55:15 -08:00
safe_session_cached_db.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
scheduled_messages.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
scim.py do_change_user_delivery_email: Add acting_user kwarg. 2024-09-30 12:00:14 -07:00
scim_filter.py zerver: Replace uri with url in local variables and comments. 2024-07-14 22:30:28 -07:00
send_email.py invites: Add `durable=True` to transaction in `do_invite_users`. 2024-11-01 16:41:15 -07:00
server_initialization.py avatar: Use fixed avatars for system bots. 2024-10-17 15:47:17 -07:00
sessions.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
singleton_bmemcached.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
soft_deactivation.py transaction: Add `durable=True` to the outermost db transactions. 2024-11-05 17:58:47 -08:00
sounds.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
sqlalchemy_utils.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
storage.py storage: Simplify system bot avatar logic. 2024-10-25 10:59:57 -07:00
stream_color.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
stream_subscription.py mypy: Remove use of ValuesQuerySet and QuerySetAny. 2024-08-24 17:30:41 -07:00
stream_topic.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
stream_traffic.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
streams.py streams: Fix handling empty groups when computing setting values. 2024-11-22 10:48:41 -08:00
string_validation.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
subdomains.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
subscription_info.py streams: Optimize fetching setting values for web public subs. 2024-11-19 13:26:42 -08:00
templates.py help-links: Limit billing related relative gear menu links. 2024-09-30 11:35:45 -07:00
test_classes.py transaction: Add 'savepoint=True' explicitly in tests, if used. 2024-11-21 14:55:15 -08:00
test_console_output.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
test_data.source.txt
test_fixtures.py text_fixtures: Fix buggy skip-checks placement. 2024-09-24 15:00:46 -07:00
test_helpers.py requirements: Upgrade Python requirements. 2024-11-19 11:09:34 -08:00
test_runner.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
tex.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
thumbnail.py slack: Call the correct resize_* function when importing realm icon. 2024-11-08 15:43:18 -08:00
timeout.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
timestamp.py python: Consistently use from…import for datetime. 2023-12-05 12:01:18 -08:00
timezone.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
topic.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
topic_sqlalchemy.py narrow: Migrate legacy SQLAlchemy select syntax. 2024-07-16 14:50:30 -07:00
transfer.py upload: Rename "upload_image_to_s3"; it is not only for images. 2024-09-09 12:40:17 -07:00
typed_endpoint.py endpoints: Remove the has_request_variables decorator. 2024-09-05 16:02:12 -07:00
typed_endpoint_validators.py user_settings: Migrate to typed_endpoint. 2024-07-31 17:10:06 -07:00
types.py streams: Fix setting values passed in never subbed dicts. 2024-11-19 13:26:42 -08:00
url_decoding.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
url_encoding.py urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
url_redirects.py help: Create "Configure send message keys" article. 2024-10-10 14:33:38 -07:00
user_agent.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
user_counts.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
user_groups.py user_groups: Define AnonymousSettingGroupDict in types.py. 2024-11-15 16:36:37 -08:00
user_message.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
user_status.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
user_topics.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
users.py webhooks: Support filtering GitHub activity from private repositories. 2024-10-31 10:40:28 -07:00
utils.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
validator.py endpoints: Remove the has_request_variables decorator. 2024-09-05 16:02:12 -07:00
widget.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
zcommand.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
zephyr.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
zulip_update_announcements.py zulip updates: Add update about sidebars and file size limit. 2024-11-04 16:54:58 -08:00