zulip/zerver/lib
Steve Howell b340b28055 Extract get_service_bot_events().
There are several reasons to extract this function:

    * It's easy to unit test without extensive mocking.
    * It will show up when we profile code.
    * It is something that you can mostly ignore for
      most messages.

The main reason to extract this, though, is that we are about
to do some fairly complex splicing of data for the use case
of mentioning service bots on streams they are not subscribed to,
and we want to localize the complexity.
2017-09-26 18:49:03 -07:00
..
bugdown linter: Add lint rule banning 'import os.path' 2017-09-22 10:32:21 -07:00
url_preview preview.py: Fix error raised on uploading file with unicode filename. 2017-06-19 14:58:44 -04:00
webhooks mypy: strict optional fixes. 2017-05-24 18:50:59 -07:00
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
actions.py Extract get_service_bot_events(). 2017-09-26 18:49:03 -07:00
addressee.py addressee: Add missing Realm import for mypy. 2017-09-25 14:21:01 -07:00
alert_words.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
avatar_hash.py avatar_hash: Update a comment to reflect the current code. 2017-06-26 15:15:32 -07:00
avatar.py Make user_id, realm_id mandatory in _get_unversioned_avatar_url. 2017-07-17 21:01:30 +00:00
bot_lib.py lint: Add a lint check for bare type: ignores. 2017-07-27 16:31:55 -07:00
bulk_create.py backend tests: Add 'AARON' as bot owner of OUTGOING_WEBHOOK_BOT. 2017-09-26 16:11:27 -07:00
cache_helpers.py models: Add new get_user_profile_by_api_key helper. 2017-08-24 23:17:08 -07:00
cache.py linter: Add lint rule banning 'import os.path' 2017-09-22 10:32:21 -07:00
camo.py pep8: Add compliance with rule E261 to camo.py. 2017-05-07 23:21:50 -07:00
ccache.py zephyr: Fix bogus uses of force_bytes that break on Python 3. 2017-08-16 17:23:57 -07:00
context_managers.py mypy: Amend flock contextmanager to accept Union[int, IO[Any]]. 2017-08-05 17:53:18 -07:00
create_user.py registration: Set is_realm_admin on user creation. 2017-08-22 14:26:17 -07:00
db.py pep8: Add compliance with rule E261 to zerver/lib/db.py. 2017-05-18 03:00:32 +05:30
debug.py mypy: Fix several Optional typing errors. 2017-02-10 23:53:44 -08:00
digest.py logger: Add new create_logger abstraction to simplify logging. 2017-08-27 18:31:53 -07:00
domains.py Add stricter domain validation and improve error messages. 2017-01-26 17:24:25 -08:00
email_mirror.py email_mirror: Convert subjects back to str from Redis's bytes. 2017-08-25 16:14:33 -07:00
emoji.py reactions: Store the emoji codepoint in the database. 2017-08-15 09:29:27 -07:00
error_notify.py Fetch system bots using new get_system_bot function. 2017-05-23 10:30:40 -07:00
events.py Only require ids for finding DefaultStream objects. 2017-09-20 10:31:33 -07:00
exceptions.py mypy: Remove type: ignores not needed in Python 3. 2017-08-25 11:04:20 -07:00
export.py lib: Remove unused get_user_profile_by_email import in export.py. 2017-07-20 16:50:23 -07:00
feedback.py feedback: Add type on Redis-fetched data. 2017-08-25 16:14:33 -07:00
fix_unreads.py fix_unreads: Add docstring explaining migration use case. 2017-09-07 07:06:03 -07:00
generate_test_data.py generate_test_data: Replace source with non-Gutenberg text. 2017-08-05 11:04:35 -07:00
hotspots.py hotspots: Use tutorial_status to manage whether we show hotspots. 2017-09-15 04:14:52 -07:00
html_diff.py message-edit: Patch html tags after edits on new lines. 2017-06-19 16:43:11 -04:00
i18n.py i18n: Optimize get_language_list(). 2017-09-14 02:28:58 -07:00
initial_password.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
integrations.py integrations: Add hubot to "Interactive bots" category. 2017-09-26 16:00:41 -07:00
logging_util.py logging: Avoid logging certain common 404 errors to error logs. 2017-09-16 08:07:06 -07:00
management.py management: Handle the invalid user arguments cases separately. 2017-08-27 12:34:23 -07:00
mention.py mention: Tiny tweak to get loop fusion. 2017-09-25 16:02:56 -07:00
message.py mypy: Avoid Message.is_status_message if rendered_content is None. 2017-09-25 16:02:56 -07:00
migrate.py migrations: Add create_if_not_exist() helper. 2017-06-13 13:58:58 -07:00
mobile_auth_otp.py mobile: Add mobile one-time-pad library. 2017-04-28 11:47:35 -07:00
name_restrictions.py name_restrictions: Update with new competitors and portico pages 2017-07-26 12:10:58 -04:00
narrow.py Update narrow.py, messages.py to support is:unread. 2017-06-19 06:51:13 -04:00
notifications.py notifications.py: Add regex for matching relative avatar URLs. 2017-09-22 10:04:33 -07:00
onboarding.py onboarding.py: Add link to getting-your-organization-started-with-zulip. 2017-08-22 14:26:17 -07:00
outgoing_webhook.py outgoing webhook: Notify bot owner on failure response. 2017-09-26 16:11:27 -07:00
parallel.py mypy: Remove superfluous older 'type: ignore' annotations. 2017-08-08 11:27:51 -07:00
profile.py decorator: Extract zerver/lib/profile.py. 2017-08-15 10:54:23 -07:00
push_notifications.py APNs: Add message body to notification payload. 2017-09-18 16:37:02 -07:00
queue.py queue: Extract event retry into retry_event(). 2017-08-22 11:16:48 -07:00
rate_limiter.py rate_limiter: Add types on Redis-fetched data. 2017-08-25 16:14:33 -07:00
realm_icon.py realm_icon: Use string_id instead of domain for Realm gravitar. 2017-03-13 14:28:43 -07:00
redis_utils.py settings: Add support for specifying a remote redis password. 2016-08-11 16:54:22 -07:00
request.py request: Improve documentation of request.py. 2017-08-14 09:49:29 -07:00
request.pyi JsonableError: Move into a normally-typed file. 2017-07-24 16:41:22 -07:00
response.py errors: Eliminate redundant json_response_to_error calls. 2017-07-25 15:33:11 -07:00
rest.py api: Allow incoming webhook bots to use the send_message API. 2017-08-22 10:06:34 -07:00
retention.py messages: Add support for admins deleting messages. 2017-05-29 21:59:38 -07:00
send_email.py emails: Log emails that are queued or sent in dev environment. 2017-09-26 15:02:47 -07:00
sessions.py mypy: Mark get_session_user() as returning Optional[int]. 2017-08-09 18:04:21 -07:00
soft_deactivation.py logger: Add new create_logger abstraction to simplify logging. 2017-08-27 18:31:53 -07:00
sqlalchemy_utils.py mypy: Remove a bunch of now-unnecessary type: ignore annotations. 2016-10-17 11:48:34 -07:00
statistics.py statistics: Delete a bunch of dead code. 2017-07-31 17:06:15 -07:00
str_utils.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
stream_recipient.py Introduce StreamRecipient class. 2017-09-15 10:44:32 -07:00
streams.py Add MutedTopic model. 2017-09-02 09:19:51 -07:00
test_classes.py backend tests: Add 'AARON' as bot owner of OUTGOING_WEBHOOK_BOT. 2017-09-26 16:11:27 -07:00
test_data.source.txt test_data.source.txt: Replace postmodernism generator text with a play. 2017-08-23 13:00:39 -07:00
test_fixtures.py Create complex sample messages for dev VM. 2017-08-01 20:54:39 -07:00
test_helpers.py test_decorator: Add explicit subdomains in tests. 2017-08-28 22:51:57 -07:00
test_runner.py mypy: Remove type: ignores not needed in Python 3. 2017-08-25 11:04:20 -07:00
tex.py mypy: Fix Optional typing issues in tex.py. 2017-03-23 15:49:08 -07:00
timeout.py pep8: Add compliance with rule E261 timeout.py. 2017-06-04 15:06:29 +05:30
timestamp.py Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
timezone.py Add timezone field in UserProfile. 2017-03-15 11:18:24 -07:00
topic_mutes.py Have exclude_topic_mutes() accept a stream id. 2017-09-20 10:31:33 -07:00
type_debug.py mypy: Remove superfluous older 'type: ignore' annotations. 2017-08-08 11:27:51 -07:00
unminify.py linter: Add lint rule banning 'import os.path' 2017-09-22 10:32:21 -07:00
upload.py upload: Fix uploading files with Python 3. 2017-08-16 07:33:23 -07:00
user_agent.py tests: Replace test_user_agent_parsing with a normal test. 2017-09-16 03:56:18 -07:00
users.py bots: Add UI to select Slack compatible interface for webhooks. 2017-07-28 16:22:55 -07:00
utils.py utils: Cast generate_random_token to str. 2017-07-17 23:18:47 -07:00
validator.py validators: Add check_url validator. 2017-06-15 15:03:26 -07:00