Commit Graph

20878 Commits

Author SHA1 Message Date
Tim Abbott 27bb680aa5 message_list: Fix exception with nonexistent streams.
If the stream no longer exists, we don't need to try to show a stream
resubscribe UI.
2017-09-15 01:59:24 -07:00
Tim Abbott c330c75e3c message_list: Refactor stream->stream_name local variable. 2017-09-15 01:59:24 -07:00
Robert Hönig 0941e27003 docs: Add docopt.org to shell understanding tips. 2017-09-15 01:40:59 -07:00
Vishnu Ks 2993ae5433 models: Include create_time in Attachment to_dict method. 2017-09-15 01:27:28 -07:00
Vishnu Ks e34931971b models: Include size in Attachment to_dict method. 2017-09-15 01:27:28 -07:00
Vishnu Ks 22bab1c7ec events: Add upload_quota to initial state data. 2017-09-15 01:27:27 -07:00
Vishnu Ks 0ce62cd3e1 events: Add total_uploads_size to initial state data. 2017-09-15 01:27:20 -07:00
Tim Abbott f1a0f23d23 bugdown: Document the mention fetches code block. 2017-09-15 01:21:04 -07:00
Steve Howell 7159f34bed Avoid getting realm emoji unless there is emoji syntax. 2017-09-15 01:09:08 -07:00
Steve Howell 8a941d03ae Avoid querying streams unless there are stream links. 2017-09-15 01:09:08 -07:00
Steve Howell c3032a7fe8 Avoid looking up emails when rendering messages.
We now fetch email -> id mappings for messages ONLY if
it potentially uses the !avatar(foo@example.com) syntax.
2017-09-15 01:09:08 -07:00
Steve Howell 4e7fce60ee Add possible_mentions() to speed up rendering.
We now triage message content for possible mentions before
going to the cache/DB to get name info.  This will create an
extra data hop for messages with mentions, but it will save
a fairly expensive cache lookup for most messages.  (This will
be especially helpful for large realms.)

[Note that we need a subsequent commit to actually make the speedup
happen here, since avatars also cause us to look up all users in
the realm.]
2017-09-15 01:09:08 -07:00
Steve Howell 7a4c3c1a5c Make mentions regex more strict for all/everyone.
We only want `@all` and `@everyone` as shorthands.  For user
names we want askerisks: `@**Steve Howell**`.
2017-09-15 01:09:08 -07:00
Steve Howell 6a625eef66 Clean up model imports for bugdown/__init__.py.
We broke some circular dependencies a while back, so we can
move a bunch of imports to the top of the file.
2017-09-15 01:09:08 -07:00
Eeshan Garg a041a23199 webhooks/trello: Ignore when Board background is changed.
I feel like getting notifications about a board's background being
changed isn't very useful information and could interrupt the flow
of other important information such as Card changes or movement,
so I think we should not support this event and
should simply ignore such payloads in the future.
2017-09-15 01:02:47 -07:00
Tim Abbott d06cb4e4fd event_queue: Make path forward for push/email notifications clearer.
This is a nonfunctional refactor, designed primarily to make it
simpler to extend this code path when we later add support for
controlling whether email notifications go out on stream messages.
2017-09-15 01:01:11 -07:00
Tim Abbott d0e8163f13 event_queue: Remove some unnecessary parenthesis. 2017-09-15 01:01:11 -07:00
Tim Abbott e085af3324 Fix stream_push_notify feature to not send emails.
Previously, due to a logic bug, this feature would also send email
notifications for all messages on the stream, which is definitely not
the intent.  The recent refactoring we just did makes the logic more
obvious.
2017-09-15 01:01:11 -07:00
Tim Abbott 22ea2a5858 event_queue: Separate email and push notification loops. 2017-09-15 01:01:11 -07:00
Tim Abbott 7fa0325fb5 event_queue: Refactor notified logic. 2017-09-15 01:01:11 -07:00
Robert Hönig 447eba23ba twitter bot: Update instructions. 2017-09-15 00:56:36 -07:00
Greg Price ceca96899a deps: Adjust the header comments in lock files to reflect our tools. 2017-09-15 00:23:20 -07:00
Greg Price 7c5f3d7be1 deps: Refactor tools/update-locked-requirements to save repeating the filenames.
My first version of this just replaced the repeated list of two output
files with an array variable, but I decided `"${outputs[@]}"` was too
much to ask people to understand, and the alternative of `$outputs`,
unquoted, encourages bad habits of shell programming.  So just handle
one file at a time; the only at all expensive part here is `pip-compile`.

I am tempted to move this to Python, but holding back.
2017-09-15 00:23:20 -07:00
Greg Price a171f23d63 deps: Remove a redundant `deactivate`.
This has no effect except on the running shell; so at the end
of a script, it has no meaningful effect at all.
2017-09-15 00:23:20 -07:00
Greg Price b362e21ebb deps: Simplify tools/update-locked-requirements slightly.
This makes the code a little more concise and also more uniform,
treating `future` the same in prod and in dev.  The non-uniformity
looks like an oversight in 2be8a793e, one of the commits that updated
this code for the Python 3-only world.
2017-09-15 00:23:20 -07:00
Greg Price bab2078705 deps: Explain the `-e` oddness, and handle it uniformly. 2017-09-15 00:23:20 -07:00
Greg Price 806220cafa deps: Organize tools/update-locked-requirements a bit further.
A couple of remarks still reflected the Python 2 world; and the
"Remove the editable flag" comment was confusingly above a line
that it looks like it could be talking about, but isn't.
2017-09-15 00:23:20 -07:00
Sampriti Panda e98d7a6ee8 Fix issues with left-sidebar stream search and multiple words.
If you typed in more than one word for a stream with multiple words in
it's name, it would not show up in the search list. This fixes that
and adds some more tests covering the entire functionality of the
filter.
2017-09-15 00:22:59 -07:00
Greg Price c4b506998f tornado: Disable routine logging in dev.
This creates a lot of logging noise, and also causes confusion
for new contributors when something isn't working as they expect
and they aren't sure if this message is normal or an error.
2017-09-14 12:38:57 -07:00
Cynthia Lin 5be0124e0b left sidebar: Add cursor pointer change on hover to Streams icons. 2017-09-14 12:37:27 -07:00
Eeshan Garg 0721fc851a meetings: Switch integrations meeting to Fridays 9 am (PST). 2017-09-14 10:18:15 -07:00
Cynthia Lin d7fbae2410 left-sidebar.css: Remove .brand selector.
This selector is unused (there is no element with class `brand` in element with ID `left-sidebar`).
2017-09-14 10:18:03 -07:00
Supermanu 184bfe7cfd docs: Expand the french translation style guide.
As the french word organisation is used, the related line is excluded
from the linter spell check.
2017-09-14 08:35:51 -07:00
Brock Whittaker 25304ddeee Fix padding to match new font.
This commit fixes the padding on several things that are now not
vertically centered because the new font has slightly different
heights.
2017-09-14 07:38:44 -07:00
Cory Lynch f4a09b7758 recent_senders: Add sort by stream message recency.
If both users haven't posted in the current topic, then
as a second order sort, check which user has posted first
in the stream as a whole.

Fixes part of #5956; we still need to sort by sending in the
organization.
2017-09-14 07:20:52 -07:00
Tim Abbott e8f835d852 migrations: Fix migration 0041 failures for long attachment filenames.
We should have done this a long time ago, but better late than never.
Basically, this migration would crash in the event that there were any
attachments with particularly long names.  The fix is the next
migration, 0042; we just inline it here to avoid that crash.
2017-09-14 07:00:07 -07:00
Vishnu Ks d8f8e29ff5 frontend: Show link to delete files in quota exceeded error. 2017-09-14 06:04:09 -07:00
Vishnu Ks 9c70da1a78 docs: Remove misleading fullstop from vagrant plugin command. 2017-09-14 06:01:11 -07:00
Joshua Pan 0fd9f0bcc9 hotkeys: Make 'v' hotkey toggle. 2017-09-14 05:56:55 -07:00
Joshua Pan 42b05912f8 hotkeys: Make '?' hotkey toggle. 2017-09-14 05:56:55 -07:00
Tim Abbott 5722237f59 push: Rename received_pm to private_message.
This is a clearer name for this now more broadly used interface.
2017-09-14 05:41:37 -07:00
Sarah 97571a203d push: Add new formatting for stream message push and add tests.
This should make the push notifications for messages to streams with
the new stream push notifications setting enabled make sense.
2017-09-14 05:41:37 -07:00
Sarah c3a8138f74 user_settings: Add push notifications for all stream messages.
Add setting to enable push notifications for all stream messages.
2017-09-14 05:41:37 -07:00
Steve Howell 41e3a819da Inline get_recipient_user_ids() into two callers.
This sets us up a subsequent commit where we need more data
from the Subscription table to build recipient info, so the
function boundary doesn't work any more for get_recipient_info,
which is part of the heavily optimized send-message
path.

We used to share code here with typing notifications, but
typing notifications need a lot less data than the
send-message path, so it's useful to decouple these two
things.  The idioms that are duplicated here are pretty simple
one-liners.
2017-09-14 05:13:58 -07:00
Cynthia Lin 191bb4c20f navbar: Remove text-decoration from brand logo link. 2017-09-14 04:57:40 -07:00
Robert Hönig 29d512a4a8 docs: Move `zulip_bots` installation steps to new section. 2017-09-14 04:48:53 -07:00
Robert Hönig bc4627e61a docs: Add reference to zulip-bot-output script. 2017-09-14 04:48:10 -07:00
Robert Hönig 6bfbbaa0ce docs: Clarify zulip_bots repository install. 2017-09-14 04:48:10 -07:00
Steve Howell ac61c48964 Optimize get_status_dict_by_realm().
This change optimizes get_status_dict_by_realm() by
introducing query_for_ids(), which quickly computes
an "IN" clause for user ids.

This change also inlines the `two_weeks_ago` check, but
that is just for clarity, not performance.
2017-09-14 04:22:02 -07:00
Steve Howell aade317d87 Extract UserPresence.get_status_dicts_for_rows().
The prior version of this function was passed in a QuerySet, which
made it difficult to effectively profile the callers, and there
is really no compelling reason to pass in a query any more.
2017-09-14 04:22:02 -07:00