Commit Graph

20390 Commits

Author SHA1 Message Date
Steve Howell c5e083857b fix_unreads: Mark pre-pointer messages as unread (unless muted). 2017-08-22 20:03:18 -04:00
Steve Howell 8b16c6060c Split out fix_unreads management command.
Most of the code in show_unreads is for diagnosising unread
counts issues, and we may not use that often.

We're creating a dedicated fix_unreads management command with
less clutter.
2017-08-22 19:38:44 -04:00
Brock Whittaker 25e5a10a5b unicode: Replace "×" with HTML and HEX entities.
This refactors and fixes unicode issues where entities don't display
properly due to being a special character that seems to be rendered
incorrectly in a non-deterministic way every time.
2017-08-22 16:31:53 -07:00
Tim Abbott 7c37fc8909 auth: Improve robustness of not sending duplicate login emails.
Previously, we had a very not-robust check on the URL, which might
have caused cases like Google auth registration to not do the right
thing.
2017-08-22 16:26:30 -07:00
Tim Abbott 50ad679342 test-backend: Recommend snakeviz over runsnake.
It has support for Python 3.
2017-08-22 15:44:30 -07:00
Preston Hansen c31ef34491 enqueue_digest_emails: Only send digest emails weekly, on Tuesday.
Fixes: #6114.
2017-08-22 15:07:53 -07:00
Tim Abbott 8dff14430e tools: Remove old python 3 compatibility checker.
Now that we've migrated over to Python 3, this tool is no longer required.

Fixes #6217.
2017-08-22 14:58:59 -07:00
Tim Abbott ff346f93b5 requirements: Add missing typing dependency. 2017-08-22 14:58:54 -07:00
Harshit Bansal 1a43728b1e emoji_picker: Fix tracebacks in navigation if search results are empty.
This fixes 2 bugs:

* If you perform a search and search results are empty then if you try
  to navigate using arrow keys, page-down/page-up etc. it will give a
  traceback.
* Search for example 'a' and then navigate to the last of the search
  results using arrow keys. Now press 'tab' to go back the search box
  and restrict the search to for e.g. 'ab' and now try to navigate
  using arrow keys, page-up/page-down etc you will get a traceback.
2017-08-22 14:48:02 -07:00
Cynthia Lin ae169e7e86 README.md: Update mypy badge with link to mypy Zulip blog article. 2017-08-22 14:30:55 -07:00
Rishi Gupta 4e7d87b676 onboarding.py: Add link to getting-your-organization-started-with-zulip.
Also has a few minor updates to the rest of the text.
2017-08-22 14:26:17 -07:00
Rishi Gupta d296f29fa7 emails: Link to organization getting started guide in followup_day1. 2017-08-22 14:26:17 -07:00
Rishi Gupta 7c3f20d2ba registration: Set is_realm_admin on user creation.
This makes it easier for later parts of the user creation/onboarding process
to condition on whether the user is a realm admin.

No change in behavior.
2017-08-22 14:26:17 -07:00
Rishi Gupta d28337869e help: Fix links to integrations in organization getting started guide. 2017-08-22 14:26:17 -07:00
Rishi Gupta 4a74399514 emails: Update followup_day2 with better topic advice.
These topics also better match the new followup_day2 email illustrations.
2017-08-22 14:26:17 -07:00
Rishi Gupta 4fc263d947 help: Update streams advice in getting-your-organization-started-with-zulip. 2017-08-22 14:26:17 -07:00
Tim Abbott bcf34fea33 requirements: Downgrade sphinx.
The latest version seems to not work for us on ReadTheDocs.
2017-08-22 13:21:15 -07:00
Brock Whittaker 52588cb2b6 Upgrade jQuery to v3.2.1. 2017-08-22 12:54:26 -07:00
Brock Whittaker 09be694ea3 Rewrite scrollbar width check to not use jQuery.
This check was going to do the wrong thing when we upgraded to jQuery 3.
2017-08-22 12:50:54 -07:00
Rishi Gupta b32fe9f2a0 features: Update screenshot and add tool to generate.
This adds a new management command that should make generating or
updating screenshots a bit easier in the future.
2017-08-22 11:32:22 -07:00
Umair Khan a5c05f9812 push_notification: Retry event in case of error.
Fixes #5301
2017-08-22 11:16:48 -07:00
Umair Khan 62cae23601 queue: Extract event retry into retry_event().
This commit takes the code from zerver.lib.outgoing_webhook.request_retry
and creates a new generic function called retry_event.
2017-08-22 11:16:48 -07:00
Brock Whittaker 1a9c1241af Disable ability to highlight message reactions.
This adds the `user-select: none` property to `.message_reactions`
to disable accidental highlighting or selecting of the text.
2017-08-22 11:11:40 -07:00
Robert Hönig c98ed31e80 testing: Remove obsolete coveralls conf file.
Instead of coveralls, we now use codecov.
2017-08-22 11:10:55 -07:00
Steve Howell 81e3f489f2 Use sender realm in user_profiles_from_unvalidated_emails.
This change is mostly based on a similar commit from hackerkid
in a feature branch.  It borrows both code and ideas.  Some of
it's my own stuff, as I was working on a newer branch.

We now call get_user_including_cross_realm_email() inside of
user_profiles_from_unvalidated_emails(), instead of using
get_user_profile_by_email.

This requires a few of our callers to pass down sender into us.

One consequence of this change is that we change the symptoms
for trying to send to emails outside of your realm.  In some
cases, we simply raise an error that an email is invalid to us
instead of getting into the deeper validate_recipient_user_profiles
check.
2017-08-22 10:42:15 -07:00
Steve Howell 54edecd510 Replace adddressee.for_email() with for_user_profile().
This requires us to change not just the immediate caller, but
also some of their callers, to pass user_profile objects around
instead of emails.
2017-08-22 10:42:15 -07:00
Steve Howell c61c0f3edc Use user_profile, not email, in check_message().
We are trying to convert emails to user_profiles earlier in
the codepath.  This may cause subtle changes in which errors
appear, but it's probably generally good to report on bad
addressees sooner than later.
2017-08-22 10:42:15 -07:00
Steve Howell c56a631b65 Move user_profiles_from_unvalidated_emails -> addressee.py.
This will avoid circular dependencies.
2017-08-22 10:42:15 -07:00
Steve Howell 32f18f77d4 Extract two methods from recipient_for_emails.
We now have these methods:
    user_profiles_from_unvalidated_emails
    recipient_for_user_profiles
2017-08-22 10:42:15 -07:00
Steve Howell 30d37d1270 Add Addressee class.
This class simplifies the calling sequence to methods like
check_message and _internal_prep_message, and it's also more
type safe.

Checking for message types is encapsulated with calls to is_stream()
and is_private().  There are also shortcut constructors when you
know that the type of the address (stream vs. private), which is often.
2017-08-22 10:42:15 -07:00
Tim Abbott 0d390edeeb version: Bump PROVISION_VERSION for latest changes. 2017-08-22 10:42:01 -07:00
Tim Abbott 15c49679fe requirements: Document the process a bit more. 2017-08-22 10:42:01 -07:00
Tim Abbott 559dc40ebb requirements: Mark dateutil as being explicitly used by tests.
Since it's a library we might eventually start using in production
code without thinking about it, I'd rather just have it be available
in all environments.
2017-08-22 10:42:01 -07:00
Tim Abbott f5fe9d24bb requirements: Remove unnecessary dateutil dependency.
This is only needed for some Nagios scripts, which don't use the Zulip
virtualenv anyway.  They already correctly install the relevant
package via apt.
2017-08-22 10:42:01 -07:00
Tim Abbott bc63cdf538 requirements: Remove unnecessary netifaces dependency.
This is only used for
puppet/zulip_ops/files/zulip-ec2-configure-interfaces, and that
actually doesn't even use the Zulip virtualenv (and correctly already
has puppet configuration to install this dependency).
2017-08-22 10:42:01 -07:00
Tim Abbott 54ec4e9e34 requirements: Remove flup dependency.
This was needed for fastcgi, which we stopped using many months ago.
2017-08-22 10:42:01 -07:00
Robert Hönig 84a7350de6 docs: Clarify webhook-specific guides. 2017-08-22 10:38:48 -07:00
rht 95df787a1e requirements: Remove scandir implicit dependency. 2017-08-22 10:10:57 -07:00
rht beba59bfd5 requirements: Remove socialauth.txt recursive dep file. 2017-08-22 10:10:57 -07:00
rht 3f343f4b7b requirements: Remove emailmirror.txt recursive dep file.
The libraries in emailmirror.txt, with the exception of talon, are
imported indirectly, and so these are better autogenerated.
2017-08-22 10:10:57 -07:00
rht 99511421d1 requirements: Rename py3_common.txt to common.txt. 2017-08-22 10:10:57 -07:00
rht 0a469fd4c8 requirements: Lock prod.txt instead of its py3_common dependency.
`py3_common.txt` is no longer locked.
2017-08-22 10:10:57 -07:00
rht 6a5869ec8d requirements: Rename py3_prod.txt to prod.txt. 2017-08-22 10:10:57 -07:00
rht e2627df7f0 requirements: Rename py3_socialauth.txt to socialauth.txt. 2017-08-22 10:10:57 -07:00
rht 80f4ba7a76 requirements: Replace py3_dev.txt with dev_lock.txt. 2017-08-22 10:10:57 -07:00
Tim Abbott 58edf75962 api: Allow incoming webhook bots to use the send_message API. 2017-08-22 10:06:34 -07:00
Max Schaefer 8aa5a02866 js: Remove a few spurious arguments. 2017-08-22 09:37:17 -07:00
Max Schaefer 4d0f304048 js: Fix two misphrased conditions. 2017-08-22 09:37:15 -07:00
Aditya Bansal 0dcbacdbc6 emoji_picker: Refactor toggle_emoji_popover to split out to functions. 2017-08-22 08:46:55 -04:00
Aditya Bansal f645a0304b emoji_pickers: Add tests for emoji_picker.initialize(). 2017-08-22 08:07:25 -04:00