Commit Graph

4846 Commits

Author SHA1 Message Date
Aditya Bansal
35e3d57ed9 pep8: Add compliance with rule E261 to zerver/views/invite.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
1979476152 pep8: Add compliance with rule E261 to zerver/views/integrations.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
fe3b42c8f8 pep8: Add compliance with rule E261 to zerver/views/home.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
c504b013b1 pep8: Add compliance with rule E261 to views/auth.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
57bc847874 pep8: Add compliance with rule E261 to test_urls.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
85aa07e2d4 pep8: Add compliance with rule E261 to zerver/lib/upload.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
b7c49299a6 pep8: Add compliance with rule E261 to test_runner.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
e3003653c7 pep8: Add compliance with rule E261 to test_helpers.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
26ff19f005 pep8: Add compliance with rule E261 to zerver/lib/test_classes.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
1f1fbd7648 pep8: Add compliance with rule E261 to zerver/lib/notifications.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
84eadc0562 pep8: Add compliance with rule E261 to zerver/lib/message.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
03e43b78ee pep8: Add compliance with rule E261 to zerver/lib/html_diff.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
b822e75a4b pep8: Add compliance with rule E261 to export.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
4c373dde63 pep8: Add compliance with rule E261 to events.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
1a184263b8 pep8: Add compliance with rule E261 to zerver/lib/db.py. 2017-05-18 03:00:32 +05:30
Aditya Bansal
420230b342 pep8: Add compliance with rule E261 to actions.py. 2017-05-18 03:00:32 +05:30
Umair Khan
bc15085098 gcm: Increase retries to 10 while pushing. 2017-05-17 12:14:32 -07:00
Umair Khan
38ecc35cd9 push_notifications: Catch IOError while pushing to GCM. 2017-05-17 12:14:32 -07:00
Umair Khan
7e8f4ca4e8 push_notifications: Include GCM in end-to-end test. 2017-05-17 08:09:19 -07:00
Tim Abbott
be3dc12a98 models: Move several __unicode__ methods to abstract classes.
This makes it possible to print ArchivedMessage, ArchivedUserMessage,
and ArchivedAttachment objects.
2017-05-16 21:04:58 -07:00
Tim Abbott
850519b314 api: Move cross_realm_bots into the register_ret response.
This is probably not the right long-term solution to the cross-realm
bots problem (that solution is probably to eliminate cross-realm bots
and replace them with per-realm bots).  But in the short term, this
will at least make it possible for mobile apps to interact with these
cross-realm bots using the `realm_user` data set.
2017-05-16 20:23:13 -07:00
Eeshan Garg
4f358f4034 webhooks/gitlab: Support pushing a local branch without commits.
This mostly just adds a test for GitLab related to the last commit.
2017-05-16 19:33:43 -07:00
Eeshan Garg
5687b2cdc5 webhooks/github*: Support pushing a local branch without commits.
Changes made to get_push_commits_event_message in
zerver/lib/webhooks/git.py are common to all Git integrations
that use get_push_commits_event_message. These include github,
github_webhook, gitlab, gogs, bitbucket, bitbucket2. In some
cases (for instance, gitlab), no further changes to gitlab/view.py
will be required to support pushing a local branch without commits;
adding a fixture and tests should suffice.
2017-05-16 23:51:19 -02:30
Tim Abbott
cab908b664 api: Move notifications_stream into the register_ret API.
While we're at it, we at least fix the API to use a stream ID, not a
stream name, to refer to the notifications stream.
2017-05-16 18:57:14 -07:00
Tim Abbott
0b2388bda9 push_notifications: Remove DeviceTokenType logic.
The syntax wasn't valid on Python 3.5, and the new code is somewhat
more readable anyway.
2017-05-16 12:26:55 -07:00
Tim Abbott
9d63a5ab3a push_notification: Delete obsolete DBX_IOS_APP_ID code.
I'm not sure that this was ever actually used, but it's definitely
just clutter for Zulip today.
2017-05-16 12:26:55 -07:00
Umair Khan
286f9a40e7 push_notifications: Bring file to 100% coverage. 2017-05-16 12:26:55 -07:00
Umair Khan
fa5c66c439 push_notifications: Add num_push_devices_for_user tests. 2017-05-16 12:26:55 -07:00
Umair Khan
88f5d29e19 push_notifications: Add send_to_push_bouncer tests. 2017-05-16 12:26:55 -07:00
Umair Khan
af27ad607a push_notifications: Add handle_push_notification tests. 2017-05-16 12:26:55 -07:00
Umair Khan
8a6498f55d push_notifications: Create BouncerTestCase.
Adds bounce_request method to simulate a bounce.
2017-05-16 12:26:55 -07:00
Umair Khan
5907877038 push_notifications: Add test for send_notifications_to_bouncer. 2017-05-16 12:26:55 -07:00
Umair Khan
fab4249893 push_notifications: Add get_gcm_payload tests. 2017-05-16 12:26:55 -07:00
Umair Khan
136a950041 push_notifications: Add test for APNs payload. 2017-05-16 12:26:55 -07:00
Umair Khan
47d0f7d996 push_notifications: Add tests for get_alert_from_message. 2017-05-16 12:26:55 -07:00
Umair Khan
df0d29aaff push_notifications: Add response_listener tests. 2017-05-16 12:26:55 -07:00
Umair Khan
fc0b9358e7 handle_push_notification: Remove the if condition.
'if apple_devices or android_devices' doesn't servce any purpose.
2017-05-16 12:26:55 -07:00
Umair Khan
ab411ab7b3 push_notifications: Delete remote server tokens in APNs response. 2017-05-16 12:26:55 -07:00
Umair Khan
33332539df send_android_push_notification: Delete correct tokens.
Now this function will delete tokens from RemotePushDeviceToken if it
is running on notification bouncer or PushDeviceToken if it is running
on a server which doesn't use notification bouncer.
2017-05-16 12:26:55 -07:00
Umair Khan
4a864c7515 push_notification: Send data to notification bouncer. 2017-05-16 12:26:55 -07:00
Umair Khan
4e2a6834d8 authenticated_rest_api_view: Use is_remote_server.
Using is_remote_server is more readable and future-proof since
it provides a level of abstraction.
2017-05-16 12:26:55 -07:00
Steve Howell
e6cc0ffcdd Eliminate PMs to non-subscribers when creating streams.
This should make stream creation relatively fast again, since we
will no longer send O(N) PMs out to tell folks the stream was
created.
2017-05-16 10:43:27 -07:00
Harshit Bansal
c549dea9ac bugdown: Fix the regex used for unicode emoji matching.
The regex we were using didn't cover all the unicode blocks
to which our emojis belong. This commit fixes the regex to
include all the unicode blocks and also updates the
corresponding JS regex in marked.js.

Fixes: #3460.
2017-05-16 09:05:42 -07:00
Harshit Bansal
f8824ea623 bugdown: Fix the unicode_emoji_to_codepoint() function.
Unicode codepoints are of minimum length 4, padded with extra
zeroes if the length is less than 4. This commit fixes the
`unicode_emoji_to_codepoint()` to ensure that the codepoint
it generates are of correct length.
2017-05-16 09:05:42 -07:00
Steve Howell
c8dd056ac5 Extract you_were_just_subscribed_message(). 2017-05-16 09:01:00 -07:00
Steve Howell
bbd8c1c49b Do not send PMs to subscribers when creating streams.
When we create a stream, we usually send a welcome message on the
stream itself as well as an announcement on the announcement stream,
but we no longer PM the individual users.  Hopefully this will be
more pleasant for users (less spammy), and it also will make creating a
stream a lot faster.

We still send notifications when we add subscribers to an existing
stream.
2017-05-16 08:58:17 -07:00
Tim Abbott
847f469cf2 subdomains: Toggle various links with SUBDOMAINS_HOMEPAGE. 2017-05-15 21:54:35 -07:00
Steve Howell
e2732dabf3 Send welcome messages as part of /create_realm flow.
We now pre-populate the streams in DEFAULT_NEW_REALM_STREAMS
(social/general/zulip, unless somebody changes settings.py) with
welcome messages.  This makes the streams appear to be active
right away, and it also gives the Zulip realm less of a
blank-slate feeling when you create it.

This change only affects the normal web-based create-realm flow.
It doesn't impact the management commands for creating realms
or setting default streams.
2017-05-15 20:38:08 -07:00
Eeshan Garg
21e0db03e1 webhooks/appfollow: Migrate docs to Markdown. 2017-05-15 20:14:23 -07:00
Eeshan Garg
0b5711aa7e webhooks/airbrake: Migrate docs to Markdown. 2017-05-15 20:14:23 -07:00