Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Steve Howell 1498b2ef69 apply_event: Fix broken deepcopy attempt for subs.
When we were getting an apply_event call for
a subscription/add event, we were trying not to
mutate the event itself, but this clumsy code
was still mutating the actual event:

    # Avoid letting 'subscribers' entries end up in the list
    for i, sub in enumerate(event['subscriptions']):
        event['subscriptions'][i] = \
            copy.deepcopy(event['subscriptions'][i])
        del event['subscriptions'][i]['subscribers']

This is only a theoretical bug.

The only person who receives a subscription/add
event is the current user.

And it wouldn't have affected the current user,
since the apply_event was correctly updating the
state, and we wouldn't actually deliver the event
to the client (because the whole point of apply_event
is to prevent us from having to piggyback the
super-recent events on to our payload or put
them into the event queue and possibly race).

The new code just cleanly makes a copy of each
sub, if necessary, as we add them to state["subscriptions"].

And I updated the event schemas to reflect that
subscribers is always present in subscription/add
event.

Long term we should probably avoid sending subscribers
on this event when the clients don't set something
like include_subscribers.  That's a fairly complicated
fix that involves passing in flags to ClientDescriptor.
Alternatively, we could just say that our policy is
that we never send subscribers there, but we instead
use peer_add events.  See issue #17089 for more
details.
2021-01-21 15:04:07 -08:00
.circleci circleci: Put the branch name into the topic on failure. 2020-09-18 10:37:56 -07:00
.github github: Enable retention periods for uploaded artifacts. 2020-11-03 16:36:26 -08:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
analytics change_subdomain: Create a deactivated realm on updating subdomain. 2021-01-07 14:15:22 -08:00
confirmation urls: Remove unused URL names and shorten others. 2020-09-22 10:46:28 -07:00
corporate billing: Make attach discount update the current price per license. 2020-12-17 17:09:20 -08:00
docs minor: Clean up args for apply_event. 2021-01-21 15:04:07 -08:00
frontend_tests tools: Rename tool to check-schemas. 2021-01-20 13:17:32 -08:00
locale i18n: Update translation data from Transifex. 2021-01-19 17:45:13 -08:00
pgroonga migrations: Escape more pedantically in pgroonga.0003_v2_api_upgrade. 2020-06-13 21:50:37 -07:00
puppet worker: Remove SignupWorker and friends. 2021-01-17 11:16:35 -08:00
requirements requirements: Delete unused pip2.in symlink. 2020-12-30 07:54:19 -08:00
scripts worker: Remove SignupWorker and friends. 2021-01-17 11:16:35 -08:00
static subscriptions_overlay: Show buttons in next line as block at <576px. 2021-01-19 17:49:10 -08:00
stubs requirements: Upgrade mypy to 0.790. 2020-11-12 15:44:30 -08:00
templates refactor: Eliminate checks in build_stream_dict_for_sub. 2021-01-21 15:04:07 -08:00
tools event tests: Cover do_update_user_status better. 2021-01-20 13:17:32 -08:00
zerver apply_event: Fix broken deepcopy attempt for subs. 2021-01-21 15:04:07 -08:00
zilencer django: Add custom runserver wrapper to limit startup logging. 2020-12-20 12:11:16 -08:00
zproject worker: Remove SignupWorker and friends. 2021-01-17 11:16:35 -08:00
zthumbor thumbor: Respect S3_ENDPOINT_URL setting. 2020-12-15 18:41:42 -08:00
.browserslistrc browserslist: Drop 0.2% usage threshold to 0.15%. 2020-09-28 10:57:49 -07:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.editorconfig lint: Add shfmt as a linter. 2020-10-15 15:16:00 -07:00
.eslintignore blueslip: Apply ESLint. 2019-11-01 12:13:59 -07:00
.eslintrc.json eslint: Remove unused exemptions to no-unused-vars rule. 2020-12-10 19:57:53 -08:00
.gitattributes Revert "gitattributes: Mark yarn.lock as "binary", i.e. suppress diffs." 2019-05-20 19:31:14 -07:00
.gitignore tools: Move CI docker images files into tools/ci. 2020-06-29 16:31:43 -07:00
.gitlint lint: Allow revert commit messages in gitlint. 2018-02-13 09:21:01 -08:00
.isort.cfg isort: Enable black profile. 2020-09-02 11:00:07 -07:00
.mailmap mailmap: Give priority to Vishnu KS's zulip email. 2020-07-31 10:37:49 -07:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.prettierignore lint: Use Prettier for JSON files. 2020-07-24 09:42:56 -07:00
.pyre_configuration pysa: Update .pyre_configuration to point to typeshed. 2020-09-22 15:44:47 -07:00
.sonarcloud.properties tools: Configure Zulip to be scannable by SonarCloud. 2020-06-24 12:41:17 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
babel.config.js babel: Specify core-js minor version. 2020-10-05 14:51:03 -07:00
CODE_OF_CONDUCT.md docs: Fix various capitalization errors. 2020-08-11 10:25:52 -07:00
CONTRIBUTING.md docs: Added number of selected participants in GSoC 2020. 2020-11-09 20:26:56 -08:00
Dockerfile-postgresql docs: Standardize on PostgreSQL, not Postgres. 2020-10-28 11:55:16 -07:00
LICENSE docs: Bump copyright year. 2020-04-23 16:04:54 -07:00
manage.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
mypy.ini mypy: Exclude broken typeshed stubs for markdown. 2020-11-12 15:44:30 -08:00
NOTICE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
package.json dependencies: Upgrade JavaScript dependencies. 2020-12-22 16:14:28 -08:00
postcss.config.js styles: Rename .scss files back to .css. 2020-09-15 16:33:28 -07:00
prettier.config.js casper: Remove few traces of casper. 2020-08-30 17:16:02 -07:00
README.md docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
SECURITY.md docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
setup.cfg lint: Use standard setup.cfg configuration for pycodestyle. 2020-07-14 00:41:20 -07:00
stylelint.config.js dependencies: Upgrade JavaScript dependencies. 2020-09-02 19:34:37 -07:00
tsconfig.json docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
Vagrantfile vagrant: Add a setting to downgrade VirtualBox Guest Additions. 2020-12-19 11:51:38 -08:00
version.py refactor: Eliminate checks in build_stream_dict_for_sub. 2021-01-21 15:04:07 -08:00
webpack.config.ts webpack: Remove unused hmr option for mini-css-extract-plugin. 2020-12-09 14:48:59 -08:00
yarn.lock dependencies: Upgrade JavaScript dependencies. 2020-12-22 16:14:28 -08:00

Zulip overview

Zulip is a powerful, open source group chat application that combines the immediacy of real-time chat with the productivity benefits of threaded conversations. Zulip is used by open source projects, Fortune 500 companies, large standards bodies, and others who need a real-time chat system that allows users to easily process hundreds or thousands of messages a day. With over 500 contributors merging over 500 commits a month, Zulip is also the largest and fastest growing open source group chat project.

CircleCI branch coverage status Mypy coverage code style: prettier GitHub release docs Zulip chat Twitter

Getting started

Click on the appropriate link below. If nothing seems to apply, join us on the Zulip community server and tell us what's up!

You might be interested in:

You may also be interested in reading our blog or following us on Twitter. Zulip is distributed under the Apache 2.0 license.