Commit Graph

19816 Commits

Author SHA1 Message Date
Tim Abbott ed10ce70d4 invites: Migrate to non-legacy API format.
This has the side effect of making it possible for a bot user to
invite users with its API key, which seems useful.
2017-07-31 13:08:06 -07:00
Tim Abbott 6a50e13156 uploads: Remove legacy /json/upload_file endpoint.
This migrates Zulip to use the equivalent API endpoint that has been
present for a while.
2017-07-31 13:08:06 -07:00
Tim Abbott 1e5aee054b settings: Migrate main settings-change code to API.
This was one of the few major remaining endpoints that were still on
the old-style legacy API.
2017-07-31 13:08:06 -07:00
Tim Abbott 9bf02fb913 custom_profile: Prevent bot users from accessing endpoint. 2017-07-31 13:08:06 -07:00
Tim Abbott 93261e14b7 hotspots: Prevent bot users from accessing endpoint. 2017-07-31 13:08:06 -07:00
Anna Liao 6a3c8ca2c5 push_notifications: Add human users only decorator.
This is part of #4517.
2017-07-31 13:08:06 -07:00
Tim Abbott 47eb7ee003 push_notifications: Fix incorrect URL being used in bouncer test.
This was actually testing the validation in the direct push
notifications code path, not the push notification boucner code path.
2017-07-31 13:08:06 -07:00
Harshit Bansal a26b1188c6 minor: Indentation fix. 2017-07-31 12:42:36 -07:00
Harshit Bansal 3796292913 markdown: Fix the rendering of realm filters.
A realm filter should match only after the start of a line, whitespace
or opening delimiters. But markdown was not configured to respect those
rules which was causing some weird rendering behavior. This commit fixes
the regex used for matching realm filters. On the backend we are using
regex with negative lookbehind to perform matches but since javascript
regex don't support lookbehind we are using a workaround on the frontend
using `contains_backend_only_syntax()` function which detects if a realm
filter can be rendered correctly by backend only and if so it stops the
message from getting echoed locally.

Fixes: #5154.
2017-07-31 12:42:36 -07:00
Tim Abbott 886db27de4 unread_msgs: Fix nondeterminstic ordering of unread_msgs IDs.
This should make this test flake impossible:
https://travis-ci.org/zulip/zulip/jobs/259439642#L1990
2017-07-31 10:43:43 -07:00
Tim Abbott 780dbe72d5 docs: Clean up new markdown test docs.
Thanks for Joshua Pan for the review!
2017-07-31 09:47:47 -07:00
Tim Abbott c638ea8d11 docs: Fix spelling of Travis CI. 2017-07-31 09:36:22 -07:00
Tim Abbott 1ffb791d0b docs: Further document the recommended Travis CI workflow. 2017-07-31 09:35:32 -07:00
Vaida Plankyte 9859264d56 docs: Emphasise Travis CI setup in dev env setup docs.
Fixes #5266.
2017-07-31 09:35:29 -07:00
Steve Howell a4b0ca8f07 unread.js: Remove unused argument to get_counts(). 2017-07-31 09:06:29 -04:00
Steve Howell 34e452bcfd Extract unread.unread_pm_counter().
This class is mostly a thin layer over the dictionary, but it
consolidates all the logic to create lookup keys, which have
to follow the convention of being comma-separated, numerically
sorted user_ids.
2017-07-31 08:59:18 -04:00
Steve Howell 19ebf1e23b bankruptcy: Clear unread counts for mentions. 2017-07-31 08:30:46 -04:00
Steve Howell bf81782e59 Rename num_unread_for_subject -> num_unread_for_topic. 2017-07-31 08:11:18 -04:00
Steve Howell fe74e79a17 Rename subject_count -> topic_count.
This fixes all names in the JS codebase.
2017-07-31 08:04:20 -04:00
Steve Howell d1c5cef186 subject -> topic: Fix unread_topic_counter.
This changes all internal references of `subject` to be
`topic` instead.
2017-07-31 08:03:55 -04:00
Greg Price 81bfab373d clean-repo: Revert optimization to .pyc removal.
Fixes #5887.  It seems there's some sort of issue in CPython where it
can get confused into thinking a `.pyc` file that's actually stale is
up to date -- perhaps when they date from the same second, say from
the middle of a rebase.

For now, rather than dig further to fix this properly and be sure of
having really done so, just go back to wiping out all `.pyc` files.
The impact is about 1s; that's noticeable when running a short test
file on a quad-core machine (about 8s), but not so much on a more
typical dev machine or on a larger set of tests.
2017-07-30 17:24:55 -07:00
Tim Abbott 0161671981 markdown: Document the new features of our markdown testing system.
This and the preceeding commits is significant progress towards
completing #1857.
2017-07-28 18:31:46 -07:00
Tim Abbott 76c92ad676 markdown: Enforce backend-only-syntax checks in node tests.
While we do have some known cases where syntax diverges intentionally,
this change should make it a lot easier to maintain
markdown.contains_backend_only_syntax over time.
2017-07-28 18:17:25 -07:00
Tim Abbott 1360e1c5fd markdown: Add support for specifying marked output when not matching.
This lets us document cases where the syntax is intentionally
different in ways that we don't think are problematic.
2017-07-28 18:13:15 -07:00
Tim Abbott 4b7c23f133 markdown: Rename bugdown-data.json to a more reasonable name. 2017-07-28 17:54:01 -07:00
Tim Abbott 4f4d28477d markdown: Rename markdown.contains_bugdown.
This name was confusing, since "bugdown" doesn't exactly suggest
"backend markdown processor" to people.
2017-07-28 17:51:33 -07:00
Tim Abbott f58c2b5a47 markdown: Rename bugdown_re to backend_only_markdown_re.
The new name should be more clear, since "bugdown" is arguably our
general markdown flavor's name at this point.
2017-07-28 17:48:47 -07:00
Vaida Plankyte 09e0a8861c frontend: Add header to static/5xx.html. 2017-07-28 17:45:23 -07:00
Vaida Plankyte 673d32cc46 frontend: Toggle aria-hidden for main app visibility.
This prevents things in the main app from being seen by screen readers
looking at an overlay.
2017-07-28 16:49:53 -07:00
Jack Zhang 62f4ddc8f4 Add hotspots svg images.
Illustrations by Vaida Plankyte.
2017-07-28 16:34:15 -07:00
Jack Zhang c242df042f hotspots: Style hotspots. 2017-07-28 16:34:15 -07:00
Jack Zhang 7ec51a540e hotspots: Unit test hotspots.js. 2017-07-28 16:34:15 -07:00
Jack Zhang 5a8b1e6253 hotspots: Implement hotspots frontend. 2017-07-28 16:34:15 -07:00
Jack Zhang d951375d6c Move compute_placement utility from emoji_picker to popovers. 2017-07-28 16:34:15 -07:00
Jack Zhang 6a7a4132b4 hotspots: Create hotspot_overlay template. 2017-07-28 16:34:15 -07:00
Jack Zhang 11c27015f0 hotspots: Refactor backend for hotspots v2. 2017-07-28 16:34:13 -07:00
vaibhav 691aff55a3 bots: Add UI to select Slack compatible interface for webhooks.
interface_type select menu will be used to choose the interface
for outgoing webhooks. It will be displayed only when the selected
bot type is OUTGOING WEBHOOK type. The default value is GENERIC
interface type (1).
2017-07-28 16:22:55 -07:00
Tim Abbott f834ae14bc docs: Update management command documentation. 2017-07-28 16:12:10 -07:00
Pweaver (Paul Weaver) 5932896ebb Fix browser error reporting to find webpack source map files.
When we switched to using webpack, source map files weren't being
logged in the expected place.
2017-07-28 16:01:23 -07:00
Tim Abbott 7778a66171 test_messages: Add a test for unauthorized mirroring of PMs. 2017-07-28 15:55:34 -07:00
Tim Abbott 8d0b743a6f test_messages: Add a test for PMs to deactivated users. 2017-07-28 15:53:33 -07:00
Tim Abbott a9e987f31d test_messages: Add a test for private messages copying self. 2017-07-28 15:49:27 -07:00
Vishnu Ks 6527b3bbd9 actions: Create validate_recipient_user_profiles function. 2017-07-28 15:39:44 -07:00
Vishnu Ks b1fba81490 actions: Create get_recipient_from_user_ids function. 2017-07-28 15:39:44 -07:00
Aditya Bansal 28befc78f2 actions: Fix message_id logged upon event 'subscription_created'. 2017-07-28 14:50:55 -07:00
Aditya Bansal 452bbd9104 test_helpers: Extract stub for request_event_queue & get_user_events. 2017-07-28 14:50:55 -07:00
Joshua Pan e6611fec99 markdown.js: Remove paragraph break from numbered lists.
Fixes #5902.
2017-07-28 12:32:20 -07:00
Tim Abbott 94a1070979 i18n: Don't try to clear local storage caches if no local storage. 2017-07-28 12:18:33 -07:00
Tim Abbott 93418c6eb4 translations: Remove unnecessary cache clearing code.
Since the browser reloads when new server versions are deployed, the
other similar block already handles this issue.
2017-07-28 12:18:15 -07:00
Tim Abbott a17f42a6f9 events: Don't access state['unread_msgs'] unless it exists.
Since that specific state features depends on two features in the
`want` list, we need this extra check.
2017-07-28 12:05:13 -07:00