Commit Graph

3547 Commits

Author SHA1 Message Date
Rishi Gupta 2b0a7fd0ba Rename models.get_realm_by_string_id to get_realm.
Finishes the refactoring started in c1bbd8d. The goal of the refactoring is
to change the argument to get_realm from a Realm.domain to a
Realm.string_id. The steps were

* Add a new function, get_realm_by_string_id.

* Change all calls to get_realm to use get_realm_by_string_id instead.

* Remove get_realm.

* (This commit) Rename get_realm_by_string_id to get_realm.

Part of a larger migration to remove the Realm.domain field entirely.
2017-01-04 17:12:23 -08:00
Umair Khan f208813ea3 Add Find My Team feature. 2017-01-03 21:33:42 -08:00
Vamshi Balanaga 234310bfd1 integrations: Add webhook code, API endpoint, and tests for solano labs. 2017-01-03 20:18:34 -08:00
Vamshi Balanaga d6b551d508 integrations: Add webhook payloads for solano labs 2017-01-03 20:18:34 -08:00
Rishi Gupta cf762eaf84 Change X.realm.id to X.realm_id across codebase.
This makes it more clearly the pattern in the Zulip codebase, and thus
decreases the risk of accidentally doing database queries.
2017-01-03 16:46:26 -08:00
Rishi Gupta caccf8ee17 Remove models.get_realm(domain). 2017-01-03 16:46:15 -08:00
Rishi Gupta 130f981901 messages.send_message_backend: Take a realm_str instead of a domain. 2017-01-03 16:46:15 -08:00
Rishi Gupta b206d6f251 message.py: Change domain to realm_id in render_markdown args. 2017-01-03 16:46:14 -08:00
Rishi Gupta c6e12e74be Change domain to realm_id in bugdown and realm filter dicts and caches. 2017-01-03 16:25:20 -08:00
Rishi Gupta be6f54d7bb messages.py: Add sender.realm.id to MessageDict. 2017-01-03 16:25:20 -08:00
Rishi Gupta 50d67d9a13 test_messages: Add warning about running test_bulk_message_fetching alone.
Running this test fails if it is not run as a part of the larger
test_messages suite. This commit adds a comment to that effect.
2017-01-03 16:25:20 -08:00
Jackson 29ce856843 Clean PUT /users/me/pointer to POST /users/me/pointer. 2017-01-03 15:43:11 -08:00
Jackson 0a9869868c Clean PUT /users to POST /users 2017-01-03 15:40:00 -08:00
Jackson 6ec8abab86 Clean PUT /default_streams to POST /default_streams. 2017-01-03 15:40:00 -08:00
Tim Abbott 3a9a6308fd Fix per-user database queries for emoji reactions.
This was a classic database-queries-in-loop bug.
2017-01-03 10:53:26 -08:00
anirudhjain75 5f4a822655 mypy: Annotate zerver/tests/test_decorators.py. 2017-01-02 08:59:49 -08:00
Tim Abbott a61386cbbc github: Fix GitHub integration CSRF issue.
The new GitHub dispatcher integration was apparently totally broken,
because we hadn't tagged the new dispatcher endpoint as exempt from
CSRF checking.  I'm not sure why the test suite didn't catch this.
2016-12-30 20:31:08 -08:00
Tim Abbott 5c0730d7ca reactions: Fix check for valid emoji.
The previous logic did not correctly handle the case where there were
realm emoji (non-realm emoji would be inaccessible).
2016-12-30 17:51:31 -08:00
Tim Abbott 8d66a4f53f test_signup: Fix test failure due to user docs include/. 2016-12-30 17:46:55 -08:00
Tim Abbott 687d0cbf9e docs: Add support for including markdown files in others.
This uses a third-party dependency, python-markdown-include.

The example use for settings is intended primarily as a demonstration.
2016-12-30 17:16:29 -08:00
Umair Khan b6cb6a4f0c ldap: Inherit FakeLdap exceptions from ldap. 2016-12-30 16:55:06 -08:00
K.Kanakhin 0d8c18a6dd nagios-plugins: Add websocket checking to nagios message sending test.
- Add websocket client to create connection with SockJS websocket server.
  It contains callback method to launch after connection setup.
- Add '--websocket' parameter to 'check_send_receive_time' script to
  check websocket connection.
- Add testing  websocket connection to production installation checking.
- Add cronjob to launch websocket connection nagios test.

This makes it possible for Zulip Nagios monitoring to check for
problems impacting the websockets sending code path, which is what all
web users use.
2016-12-30 15:36:37 -08:00
Tim Abbott 0ddaa13eeb lint: Fix indentation error in user_settings.py. 2016-12-30 14:31:04 -08:00
Jackson aeac3848c8 integrations: Add webhook code, API endpoint, and tests for HelloSign. 2016-12-30 14:19:31 -08:00
Prabod Rathnayaka 6f087e468e Add setting hiding private message content in desktop notifications.
Tweaked by tabbott to fix a refactoring bug, set the default to True,
fix the real-time sync, and add tests for this.

Fixes #2355.
2016-12-30 14:10:34 -08:00
Vamshi Balanaga bf71ad162c Update Google Calendar Integration.
Update integration to use the latest Google API client.
Move Google Account authorization code to a separate file.
Move relevant files from 'bots/' to 'api/integrations/google/'.
Add documentation for integration.
2016-12-30 12:01:31 -08:00
Tim Abbott b36e94c954 bugdown: Blacklist linkifying the .md TLD.
Fixes #2065.
2016-12-29 18:17:50 -08:00
Rishi Gupta 674f068b92 Script to add all current Zulip users to a mailchimp list. 2016-12-29 16:24:40 -08:00
Rishi Gupta 13d1a636d5 queue_processors.SignupWorker: Upgrade to MailChimp API v3.0.
Removes the dependence on postmonkey, which is a wrapper around
MailChimp API v1.3. MailChimp recommends using their v3.0 API directly,
rather than through a wrapper library.
2016-12-29 16:16:18 -08:00
Rishi Gupta c61938f719 SignupWorker: Use dictionary indexing instead of get for name and email.
We always pass in EMAIL in data, and NAME in merge_vars.
2016-12-29 16:16:18 -08:00
Rishi Gupta 823659848c Change UserProfile.enter_sends to default to False.
Adds a database migration.
2016-12-29 15:55:23 -08:00
Tim Abbott 0847515203 Fix text_type->Type mypy merge conflict error. 2016-12-29 15:03:37 -08:00
Rishi Gupta 9e5325a164 Add /stats page with basic stats graph.
Adds a new url route and a new json endpoint.
2016-12-29 14:20:13 -08:00
Rishi Gupta 7b057392c6 decorator.py: Add to_utc_datetime converter function. 2016-12-29 14:20:13 -08:00
Rishi Gupta 40529cdd14 timestamp.py: Add {floor,ceiling}_to_{hour,day} to parallel floor_to_day. 2016-12-29 14:20:13 -08:00
Juan Verhook cfa9c2eaf2 mypy: Update zerver directory to use Text 2016-12-29 09:12:15 -08:00
Steve Howell 3d804de962 Fix FeedbackBot queue processor.
Recent changes to the API removed Client.register(), and
this change restores the correct API call, although the
codepath this affects is probably ready for eventual
deprecation.
2016-12-28 12:12:34 -08:00
Tim Abbott b677d63ed7 mypy: Fix missing class in request.pyi and document. 2016-12-28 09:37:28 -08:00
Harshit Bansal 9931ad1324 Loosen realm filter pattern validator to support Git commit IDs.
Specify, we no longer require a prefix.

Also improves the clarity of the examples in the documentation.

Fixes: #2696.
2016-12-27 20:31:08 -08:00
Tim Abbott 39f0ffdedd Move static/third/gemoji to static/generated/emoji.
Fixes #1153.
2016-12-27 20:16:23 -08:00
Tim Abbott f46d99ba85 lint: Remove zerver/migrations from main exclude list. 2016-12-27 19:45:33 -08:00
Tim Abbott fa2aa42b03 do_invite_users: Avoid creating broken PreregistrationUser objects.
While this may not have created a clear user-facing bug, it seems less
confusing for do_invite_users to only create PreregistrationUser
objects for users who actually received an email invitation.
2016-12-27 17:14:21 -08:00
Bojidar Marinov 9682d26561 invite: Leave not yet invited users in the invite modal's textarea.
Also, make zerver tell us whether invitations were sent.

Fixes #2287.
2016-12-27 17:14:21 -08:00
Tomasz Kolek 56f530331d Add default topics mechanism to stripe integration.
Fixes: #2586.
2016-12-27 16:27:54 -08:00
Tomasz Kolek 02bf4646fc Refactor transfer part of stripe integration. 2016-12-27 16:27:54 -08:00
Tomasz Kolek 6dca1ecc40 Refactor order part of stripe integration. 2016-12-27 16:27:54 -08:00
Tomasz Kolek a75d94d3cf Refactor invoice part of stripe integration. 2016-12-27 16:27:54 -08:00
Tomasz Kolek e843af5d27 Refactor customer part of stripe integration. 2016-12-27 16:27:54 -08:00
Tomasz Kolek d1c486b8e9 Refactor charge part of stripe integration. 2016-12-27 16:27:54 -08:00
paxapy 8e7fa6b2de emoji: Add add_emoji_by_admins_only realm setting.
This setting controls whether normal users can add realm emoji.

Fixes #978.
2016-12-27 15:46:14 -08:00