Commit Graph

21758 Commits

Author SHA1 Message Date
rht 9c5e0971f4 sanity_check: Check a few packages.
This just makes our check for whether we're actually in a Zulip
development environment better.
2017-10-17 22:21:33 -07:00
Tim Abbott 88325c7e85 docs: Simplify discussion of sha256sums. 2017-10-17 22:16:37 -07:00
rht dceaa1d19a Add sha256sum integrity check to the release tarball.
This stems from the discussion at
https://chat.zulip.org/#narrow/stream/general/topic/signing.20the.20release
2017-10-17 22:15:14 -07:00
Rishi Gupta c13d2cb00a user docs: Update create-a-stream to point to the org guide on streams.
Also cleans up the intro a bit.
2017-10-17 22:13:29 -07:00
Tim Abbott d37820f39f tests: Fix test_message_edit_notifications.
This was broken in a minor way by my fix to #7031.
2017-10-17 22:12:32 -07:00
Tim Abbott 1d503ad60c urls: Move the API URLs above the random other endpoints.
This should make it a lot easier for folks to find the Zulip API when
reading our urls.py file.
2017-10-17 22:09:22 -07:00
Alena Volkova 5515a075ec urls: Move the report endpoints to be API-style routes. 2017-10-17 22:05:56 -07:00
Harshit Bansal 9234abbd59 notifications: Fix realm emojis not appearing in desktop notifications. 2017-10-17 22:03:33 -07:00
Tim Abbott 513b6d624f notifications: Fix double-sending in missedmessage_hook.
While the missedmessage_hook logic originally did a reasonably good
job of avoiding double-sending notifications, there was a corner case
it didn't handle, namely a user who had been presence-idle when a
message was sent and became also event-queue-idle as well within the
next 10 minutes.  For those users, they got a notification at message
send time, and the missedmessage_hook would deliver it a second time.

We fix this by just checking the conveniently available push_notified
and email_notified variables that indicate whether the message already
had a notification triggered.

Fixes #7031.
2017-10-17 21:54:03 -07:00
Tim Abbott 2648d595c1 Revert "docs: Fix broken anchor links in troubleshooting guide."
This reverts commit fa71f64adb.
2017-10-17 21:37:26 -07:00
rht 1da3c400e3 realm import: Convert the authentication_methods from list to bitfield.
This properly reflects how this is stored in the DB.

Tweaked by tabbott to use a proper function.
2017-10-17 21:32:20 -07:00
Tim Abbott 508686bed4 provision: Fix buggy bash_profile management code.
Apparently, the previous version would just append to .bash_profile
every single time :(.
2017-10-17 21:22:32 -07:00
Tim Abbott 3fed995a41 provision_version: Move to under UUID_VAR_PATH. 2017-10-17 21:15:58 -07:00
Tim Abbott 3983ebce9a test_fixtures: Move test_db_status state under UUID_VAR_PATH.
This should mean that maintaining two Zulip development environments
using the same Git checkout no longer has caching problems keeping
track of the migration status.
2017-10-17 21:15:58 -07:00
Tim Abbott b7c3b4df0c migration_status: Switch to passing the path in Python.
This is an important prerequisite to changing these paths used in
provisioning.
2017-10-17 21:15:58 -07:00
Tim Abbott a7c639cff7 provision: Use UUID in path to compilemessages hash. 2017-10-17 21:15:58 -07:00
Tim Abbott 2ae2a94444 provision: Stop using shared var/ for caching apt state.
This didn't work at all when one did a `vagrant destroy` and then
`vagrant up`, because the cache state would be preserved even though
the machine is gone.

Fixes #5981.
2017-10-17 21:15:58 -07:00
Tim Abbott c69c38b14e export: Fix importing/exporting of user avatars.
We apparently failed to update the export code for handling what
directories avatar files should live in during the earlier process.

Fixes #7052.
2017-10-17 21:15:58 -07:00
Tim Abbott 15c0380a33 export: Fix exporting with an output file at a relative path.
Fixes #7051.
2017-10-17 20:47:29 -07:00
Tim Abbott fa71f64adb docs: Fix broken anchor links in troubleshooting guide.
Fixes #7056.
2017-10-17 20:38:59 -07:00
rht c77c2f084c
upgrade-zulip-from-git: Fix rerun script and script description. 2017-10-18 04:41:22 +02:00
Steve Howell 5a77a4d122 Inline muting_ui.mute_topic and unmute_topic.
These methods were only called by similarly named methods, so
it was kind of a confusing API, and they didn't really
encapsulate anything useful.
2017-10-17 17:41:21 -07:00
Steve Howell dea1888022 Fix muting_ui.persist_and_rerender() bug.
We were calling muting_ui.persist_and_rerender(), but
that function no longer exists.  Now we use the simpler
API.
2017-10-17 17:41:21 -07:00
Brock Whittaker 7cb7158a42 /help/: Re-add perfectScrollbar for sidebar and markdown.
This adds back the perfectScrollbar for the sidebar and markdown
sections because we already lost CTRL-F functionality, so we may
as well bring back the pretty, non-obtrusive scrollbars.

This updates the scrollbar after a successful `slideToggle` of
one of the sidebar sections.

Fixes: #6999.
2017-10-17 17:14:36 -07:00
Tim Abbott 7d3e3ff78c apps: Link to Electron app version 1.5.0. 2017-10-17 16:44:20 -07:00
Eeshan Garg 46132dade2 integrations: Distinguish between static/ URLs and logo file paths.
Previously, to check whether a logo file existed, we simply took
the static/ URL for the logo and treated it as a file path. This
led to problems when static/* was not the correct parent directory
for our static files (for example, when settings.PRODUCTION = True).

Now, we treat URLs and file paths differently and the logo file
path is constructed by joining settings.STATIC_ROOT and the
relative path to the logo file.

Fixes #7018.
2017-10-17 16:26:19 -07:00
Shubham Dhama d6a34c7a0c composebox_typeahead: Start emoji typeahead with single letter.
This changes the behaviour of the typeahead in the compose box to
start appearing with single letter lying in the range of a-z or '+'.

This is a nice solution, because all emoji names start with lower-case
letters, while most emoticons like :P use a capital letter or similar.

Fixes: #6808.
2017-10-17 16:06:13 -07:00
rht 3e258d11e0 Travis: Use travis.yml built-in way to install moreutils. 2017-10-17 09:59:59 -07:00
Darshan Chaudhary 289387ff64 travis: Fix link to docs on our Travis CI setup. 2017-10-17 09:27:04 -07:00
Steve Howell 6fbaf7e80f Remove sender-related fields from message cache.
This change makes the cache entries smaller for message
dictionaries.  It also ensures we get valid data put into
message dictionaries if, for example, the sender's avatar
changes.

After this change, all of the attributes for a message
sender are only fetched during post-processing with two
exceptions:

    * We get sender_id for "free" from the message,
      and it's the primary key that we need to figure
      out which data to fetch in post-processing.

    * We need sender_realm_id to be able to cache topic
      links, and a sender's realm id will never change,
      so it's not a concern for invalidating cache rows.

All the other attributes are either likely to change (e.g.
sender avatar_version) and/or impact the size of cache
entries more severely than the two small id fields above.

This change should improve our overall system performance
by reducing the amount of memory used by every N message
rows we cache, and typically N will be in the thousands or
so on a large realm.

The other major implication of this change is that when
a user changes their avatar, and then later messages that
the user sent are fetched, all of the fields that go into
computing the avatar url will be pulled from the database,
not from cache.
2017-10-16 23:37:10 -07:00
Steve Howell 33338f78e9 tests: Make test_bulk_message_fetching() more thorough.
We include the post-processing step when counting queries now.
2017-10-16 23:37:10 -07:00
Steve Howell d909355dc2 refactor: Move methods from models.py -> lib/messages.py.
Message.get_raw_db_rows is moved to MessageDict, since its
implementation details are highly coupled to other methods
in MessageDict.

And then sew_messages_and_reactions comes along for the
ride.

We eventually want to move Reaction.get_raw_db_rows to there
as well.
2017-10-16 23:37:10 -07:00
Steve Howell 4919eb4abd Extract MessageDict.set_sender_avatar().
We now populate the avatar url as part of the post
processing step of building message dictionaries,
so that the avatar url is no longer in cache.

This change makes the cache slimmer, because instead
of caching the avatar url (which often includes a long
hash), we just cache the smaller fields that are used
to compute the url.

Note that this commit still has the problem that we're
essentially computing the avatar url from cached fields
that can be invalid.  We will address that a few commits
later.

An immediate benefit of this change is that how we compute
avatar urls (or whether we compute them all) is now decoupled
from caching concerns.  We will address this later as
well.  (Some clients will be capable of computing their
own gravatar urls, for example.)
2017-10-16 23:37:10 -07:00
Steve Howell 3c6cc3d454 Defer deleting intermediate values in message dictionaries.
We're about to have multiple post-processing stages for building
message dictionaries.  Rather than having individual "hydration"
methods remove intermediate values, we just wait until the end.

This decouples the hyrdration steps.  The potentional problem
here is that we may have a field like sender_is_mirror_dummy
that isn't part of the final payload, but we need it for
calculating display recipients and avatars.  We don't want to
delete it too early from the objects.
2017-10-16 23:37:10 -07:00
derAnfaenger 87468f46ae queue processors: Test flow through UserActivityIntervalWorker.consume(). 2017-10-16 23:20:13 -07:00
derAnfaenger ad0407578d queue processors: Test flow through UserPresenceWorker.consume(). 2017-10-16 23:20:13 -07:00
derAnfaenger af699500b7 tests: Add option to call queue processor consumer.
This makes tests of queue processors more realistic,
by adding a parameter to `queue_json_publish` that
calls a queue's consumer function if accessed in a test.

Fixes part of #6542.
2017-10-16 23:20:13 -07:00
Priscilla 22ade4f691 docs: Fix typo on "General user guide documentation".
"browsing" on line 11 was missing an "s".
2017-10-16 22:37:34 -07:00
Vishwesh Jainkuniya dab029b817 Update hotkeys in filter stream and search people option titles.
We swapped the function of these hotkeys, but forgot to update these:

* left_sidebar: Update hotkey to 'q' in filter stream option title.
* right_sidebar: Update hotkey to 'w' in search people option title.
2017-10-16 22:27:51 -07:00
Eeshan Garg fb17481a7f webhooks/gci: Support claim, comment, submit, approve event types. 2017-10-16 22:01:19 -07:00
Greg Price 37f01add7e errors: Point to upstream 400-handling bug in our workaround. 2017-10-16 11:17:10 -07:00
Brock Whittaker a768ed548c /for/*: Restyle /for/ and /why/ pages.
This restyles them to be more readable and more put together
than before by changing the line heights, text colors, and padding.
2017-10-16 09:58:13 -07:00
Tim Abbott b5c107ed27 push_notifications: Remove unnecessary check for no devices.
This should have been checked by the caller anyway.
2017-10-13 17:30:20 -07:00
Tim Abbott 27a450b58d push_notifications: Improve error message for GCM sending issues.
This addresses one of the sources of confusion in #6993.
2017-10-13 17:30:11 -07:00
Umair Khan a48a86237d ldap: Change logging level to warning.
Fixes #6960.
2017-10-13 17:13:18 -07:00
Umair Khan 490515aea6 cleanup: Fix comment in SocialAuthMixin.auth_complete. 2017-10-13 17:13:18 -07:00
Mohd Ali Rizwi 5cfc56e772 docs: Updated bite-size label name in README.
This label got renamed to "good first issue" thanks to GitHub, and we updated
the link, but not the text.
2017-10-13 15:06:36 -07:00
Rishi Gupta 70cf4991da docs: Add notes on audience to user-docs.md. 2017-10-13 11:59:20 -07:00
Harshit Bansal 7d5bcf5534 notifications: Use lxml instead of hacky regexes to scrub inline images. 2017-10-13 16:13:58 +00:00
Harshit Bansal 8d42f42ef2 notifications: Correctly convert relative narrow links to absolute URLs. 2017-10-13 15:44:47 +00:00