Commit Graph

23513 Commits

Author SHA1 Message Date
neiljp (Neil Pilgrim) d01dcbd018 mypy: Amend tos_version parameter of create_user_profile to be Optional.
tos_version is marked as Optional[Text] in UserProfile & is Optional
in other places within zerver/lib/create_user.py
2017-12-23 01:22:22 +09:00
Aastha Gupta 560425929e compose: Notify when drafts are saved.
Fixes #7539
2017-12-22 10:51:55 -05:00
Aastha Gupta 78e8d18ef3 integrations: Rename HUBOT_INTEGRATIONS_LEGACY.
It is now simply called HUBOT_INTEGRATIONS.

Fixes #7402
2017-12-22 10:38:47 -05:00
Angelika Serwa 2f575cca72 Add Dropbox webhook integration.
This is just a basic Dropbox webhook integration. It just
notifies a user when something has changed, it does not
specify what changed. Doing so would require storing data,
as Dropbox API was created mainly for file managers, not
integrations like this.
Closes #5672
2017-12-22 10:36:21 -05:00
Marco Burstein 096088969d compose: Re-open the compose editor after restoring a draft.
Fix #5951.
2017-12-22 08:57:39 -05:00
Marco Burstein 6fc50fa21a mypy: Use Python 3 type syntax in `zerver/webhooks/sentry/view.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein 34001081c2 mypy: Use Python 3 type syntax in `zerver/webhooks/yo/view.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein 678b43494b mypy: Use Python 3 type syntax in `zerver/webhooks/airbrake/view.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein 9327048f6f mypy: Use Python 3 type syntax in `zerver/lib/events.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein 2acf3cf1d4 mypy: Use Python 3 type syntax in `zerver/webhooks/mention/view.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein 017476cdfb mypy: Use Python 3 type syntax in `zerver/lib/create_user.py`. 2017-12-22 08:17:00 -05:00
Marco Burstein e7f0139f69 mypy: Use Python 3 type syntax in `zerver/webhooks/travis/view.py`. 2017-12-22 08:17:00 -05:00
Tommy Ip 9ea7b05cfe bugdown: Rewrite markdown link to relative link conditionally. 2017-12-22 08:10:42 -05:00
Tommy Ip efe2d497f4 bugdown: Avoid matching uri with regex. 2017-12-22 08:10:42 -05:00
Tommy Ip 9ce797d68c bugdown: Extract rewrite_if_relative_link function. 2017-12-22 08:10:42 -05:00
Steve Howell 8bb230f3d5 Increase code coverage threshold to 0.07.
We are getting lots of coverage failures in builds recently
that seem to be red herrings, and this is just a quick fix.
2017-12-21 17:14:22 -05:00
Umair Khan 898acc4278 missed-message-worker: Send email through email_senders.
We have shifted to a generic queue to send all the emails. This queue
can retry in case of network issues; this makes sure that the emails are
always sent.
2017-12-20 19:36:27 -08:00
Umair Khan e0f30d02f2 email-worker: Send login email through queue.
Fixes #7460
2017-12-20 19:36:27 -08:00
Umair Khan 68513952fb email-worker: Create EmailSendingWorker.
This commit just copies all the code from MissedMessageSendingWorker
class to a new EmailSendingWorker class. All the logic to send an email
through a queue was already there. This commit only makes the logic
generic. It does so by creating a special purpose queue called
'email_senders' to send any type of email. To make
MissedMessageSendingWorker still work we derive it from
EmailSendingWorker. All the tests that were testing
MissedMessageSendingWorker now run against EmailSendingWorker.
2017-12-20 19:36:27 -08:00
Vishnu Ks f743eeb1eb circleci: Set up locale en_US.UTF-8.
See comment for motivation and what's known.

[greg: Added comment, summarizing Vishnu's results from testing.]
2017-12-20 19:18:29 -08:00
Jeremy Zhou 48163db479 docs: Update Windows installation instructions in setup-vagrant.md.
Vagrant 1.8.6 is only compatible with VirtualBox <= 5.1, so I made a
note to use version < 5.2.
2017-12-20 19:16:25 -08:00
Vishnu Ks 16d8244c0a tests: Eliminate 'Sending invitation' output spam in test_signup.
Fixes #7563
2017-12-20 18:50:01 -08:00
neiljp (Neil Pilgrim) 25d5a2ee1c requirements: Upgrade mypy to 0.560.
Fixes #7835.
2017-12-20 18:09:36 -08:00
Greg Price d4f0c4dffc docs: Restore Docker links, updated.
Previous versions of these links were removed earlier today because
Docker upstream had broken them.

To see what the links had been intended to point to, I used the
Wayback Machine (web.archive.org/web), the super-handy project of the
Internet Archive.  These are the current equivalents.
2017-12-20 11:16:50 -08:00
Steve Howell 70681628ca docs: Remove broken Docker links. 2017-12-20 09:24:43 -05:00
Brock Whittaker 8ea39d2609 input-pill: Wrap "values" in IIFE.
The function should execute initially and return a function, not
be a function that when executed returns another function. This
fixes an existing bug.
2017-12-20 08:53:27 -05:00
Brock Whittaker 511f2f3db4 input-pill: Add "onPillRemove" callback.
This will now allow a callback to be triggered when a pill is
removed from the set.
2017-12-20 08:53:27 -05:00
Rishi Gupta c2a41c268f models: Update Realm.get_admin_users to not use select_related().
None of the uses of this function in the codebase follow any of the foreign
keys of UserProfile.
2017-12-20 08:51:58 -05:00
Marco Burstein e9d7161418 compose: Warn users when posting to the #announce stream.
Currently, users are warned when mentioning @all and @everyone, but not
when posting on the #announce stream. Confirm with users that they want
to send their message on #announce if over 60 people are going to be
notified.

Fixes #6928.
2017-12-20 07:36:50 -05:00
snlkapil 1589c597d2 settings: Show local time instead of UTC in invitations tab. 2017-12-20 07:08:46 -05:00
Rishi Gupta 27a8ef86e4 actions: Add realm deactivation and reactivation to RealmAuditLog. 2017-12-19 17:46:36 -08:00
Rishi Gupta cce8d0d721 invite: Update text of success message.
We should move to a design that doesn't require so many success messages,
since each one carries translation risk (e.g. what if the translation is too
long/overflows, or is not a clear translation, etc.). But doing a quick fix
until then.
2017-12-19 17:46:36 -08:00
Rishi Gupta 4261307e27 emails: Clear ScheduledEmail emails on realm deactivation.
This only affects the invitation reminder emails; clear_scheduled_emails was
already clearing the other two types.
2017-12-19 17:46:36 -08:00
Rishi Gupta 869b4d41ef models: Add ScheduledEmail.realm.
The two extra queries in the test are due to the assert in
send_future_email.
2017-12-19 17:46:36 -08:00
Rishi Gupta cc08becb2c portico: Update FAQ on /plans. 2017-12-19 15:36:13 -08:00
Rishi Gupta 87e164043f portico: Rename plans at /plans. 2017-12-19 15:36:13 -08:00
ViRu-ThE-ViRuS c8aadaa408 integrations: Add webhook payloads for Intercom. 2017-12-19 16:50:06 -05:00
Greg Price eb650306eb circleci: Disable gitlint for now.
We get the following error (edited slightly):

  Dec 19 06:13:27 commit_messages| An error occurred while executing
    '/usr/bin/git rev-list --max-count=-1 upstream/master..HEAD':
  fatal: ambiguous argument 'upstream/master..HEAD':
    unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

We'll need to adjust the remotes to make `upstream` mean what we expect.
2017-12-18 22:21:49 -08:00
Greg Price e5c6c446b5 travis + circleci: Start postgresql during provision.
Otherwise, in CircleCI it isn't running when we need it later.
Travis must special-case starting it automatically.
2017-12-18 22:05:27 -08:00
Greg Price c83c118c6c circleci: Crudely clone a bit of `is_travis` logic.
This isn't really the right way to do this -- commit
  dcd80e665 "travis/setup-backend: Remove the '--travis' flag"
took us in the wrong direction by introducing more magic, deeper in
the stack.

But it's the same way we do it for Travis.  For now, just copy that.

[Thanks to hackerkid for cleaning up my original crude hack.]
2017-12-18 22:04:39 -08:00
Greg Price e8bf7d23bf provision: Remove transitional Python 2->3 logic in setup_venvs.
At this point if we were accidentally using `/srv/zulip-venv` for
anything, we'd have run into it by now.  So just drop the bit of
historical logic that we had to ensure that.
2017-12-18 21:59:51 -08:00
Greg Price 3ba0d5659f travis: Don't create nagios state.
As the comment says, we don't seem to use this.  And the Travis builds
work fine without it.
2017-12-18 21:43:07 -08:00
Greg Price 9ce080ebb1 circleci: Remove Circle-created gitconfig file.
[Investigation by hackerkid.]
2017-12-18 21:42:00 -08:00
Greg Price e34852acf6 package.json: Move difflib to devDependencies.
We introduced this a couple of commits ago (in #7782) for use in the
tests only.  Putting it here avoids pulling in a new dependency in
production which we don't use there.
2017-12-18 19:09:03 -08:00
Eeshan Garg 8936d03f3a webhooks/gitlab: Support Merge Request Hook approved event type.
Such payloads are generated when a GitLab repository has merge
request approvals enabled and a project member approves a merge
request. Approving is not the same as merging.
2017-12-18 19:12:54 -05:00
Andy Perez 44e6d9b54b testing: Add nice diffs to markdown python tests. 2017-12-18 19:03:38 -05:00
Andy Perez fc2298ec54 node tests: Add nice diffs to js markdown tests.
Fix #3915
2017-12-18 19:03:38 -05:00
Andy Perez 695affd44e node tests: Compare markdown using semantic equivalence.
Fix #4367
2017-12-18 19:03:38 -05:00
Greg Price 776af2e248 push notifs: Simplify content-truncation code slightly.
This should be a pure refactor.
2017-12-18 15:32:56 -08:00
Greg Price 014900c2e5 push notifs: Include same stream and sender info on GCM as on APNs.
This takes the information added to APNs payloads by #7080, and adds
to our GCM payloads the parts that it didn't already have.
2017-12-18 15:32:56 -08:00