c43a29ff54
Without the fix here, you will get an exception similar to below if you try to invite one of the cross realm bots. (The actual exception is a bit different due to some rebasing on my branch.) File "/home/zulipdev/zulip/zerver/lib/request.py", line 368, in _wrapped_view_func return view_func(request, *args, **kwargs) File "/home/zulipdev/zulip/zerver/views/invite.py", line 49, in invite_users_backend do_invite_users(user_profile, invitee_emails, streams, invite_as) File "/home/zulipdev/zulip/zerver/lib/actions.py", line 5153, in do_invite_users email_error, email_skipped, deactivated = validate_email(user_profile, email) File "/home/zulipdev/zulip/zerver/lib/actions.py", line 5069, in validate_email return None, (error.code), (error.params['deactivated']) TypeError: 'NoneType' object is not subscriptable Obviously, you shouldn't try to invite a cross realm bot to your realm, but we want a reasonable error message. RESOLUTION: Populate the `code` parameter for `ValidationError`. BACKGROUND: Most callers to `validate_email_for_realm` simply catch the `ValidationError` and then report a more generic error. That's also what `do_invite_users` does, but it has the somewhat convoluted codepath through `validate_email` that triggers this code: try: validate_email_for_realm(user_profile.realm, email) except ValidationError as error: return None, (error.code), (error.params['deactivated']) The way that we're using the `code` parameter for `ValidationError` feels hacky to me. The intention behind `code` is to provide a descriptive error to calling code, and it's not intended for humans, and it feels strange that we actually translate this in other places. Here are the Django docs: https://docs.djangoproject.com/en/3.0/ref/forms/validation/ And then here's an example of us actually translating a code (not part of this commit, just providing context): raise ValidationError(_('%s already has an account') % (email,), code = _("Already has an account."), params={'deactivated': False}) Those codes eventually get put into InvitationError, which inherits from JsonableError, and we do actually display these errors in the webapp: if skipped and len(skipped) == len(invitee_emails): # All e-mails were skipped, so we didn't actually invite anyone. raise InvitationError(_("We weren't able to invite anyone."), skipped, sent_invitations=False) I will try to untangle this somewhat in upcoming commits. |
||
---|---|---|
.circleci | ||
.github | ||
.tx | ||
analytics | ||
confirmation | ||
corporate | ||
docs | ||
frontend_tests | ||
locale | ||
pgroonga | ||
puppet | ||
requirements | ||
scripts | ||
static | ||
stubs | ||
templates | ||
tools | ||
zerver | ||
zilencer | ||
zproject | ||
zthumbor | ||
.browserslistrc | ||
.codecov.yml | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.gitlint | ||
.isort.cfg | ||
.npmignore | ||
.stylelintrc | ||
.travis.yml | ||
.yarnrc | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile-postgresql | ||
LICENSE | ||
NOTICE | ||
README.md | ||
Vagrantfile | ||
babel.config.js | ||
manage.py | ||
mypy.ini | ||
package.json | ||
postcss.config.js | ||
tsconfig.json | ||
version.py | ||
yarn.lock |
README.md
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.
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:
-
Contributing code. Check out our guide for new contributors to get started. Zulip prides itself on maintaining a clean and well-tested codebase, and a stock of hundreds of beginner-friendly issues.
-
Contributing non-code. Report an issue, translate Zulip into your language, write for the Zulip blog, or give us feedback. We would love to hear from you, even if you're just trying the product out.
-
Supporting Zulip. Advocate for your organization to use Zulip, write a review in the mobile app stores, or upvote Zulip on product comparison sites.
-
Checking Zulip out. The best way to see Zulip in action is to drop by the Zulip community server. We also recommend reading Zulip for open source, Zulip for companies, or Zulip for working groups and part time communities.
-
Running a Zulip server. Use a preconfigured Digital Ocean droplet, install Zulip directly, or use Zulip's experimental Docker image. Commercial support is available; see https://zulipchat.com/plans for details.
-
Using Zulip without setting up a server. https://zulipchat.com offers free and commercial hosting, including providing our paid plan for free to fellow open source projects.
-
Participating in outreach programs like Google Summer of Code.
You may also be interested in reading our blog or following us on twitter. Zulip is distributed under the Apache 2.0 license.