Eeshan Garg
7227f488c8
webhooks: Add support for a GitHub push event deleting a branch.
...
Fixes : #4742 .
2017-05-16 00:11:20 -02:30
Eeshan Garg
597db11a98
webhooks: Rename webhook fixtures to only include event type.
...
All webhook fixtures have now been renamed from
<webhook_name>/fixtures/<webhook_name>_<event_type>.json to
<webhook_name>/fixtures/<event_type>.json.
2017-05-13 20:07:40 -02:30
Tim Abbott
0b5954feee
Increase initial messages on user creation from 100 to 1000.
...
This makes the new user experience in an active community like
chat.zulip.org substantially nicer, since the new user will have the
same level of initial messages to populate topics (etc.) as an
existing user who is caught up.
Without this, there was an undue level of fading-for-inactivity in the
default streams.
2017-05-13 12:16:05 -07:00
Tim Abbott
72abd4f12d
mentions: Fix subject line and sender for missed-message mentions.
...
This fixes 2 issues:
* The term "@-mentioned" is simplified to "mentioned".
* We would incorrectly list other people who sent context messages as
among the people who mentioned you.
2017-05-12 13:50:25 -07:00
James Rowan
0facaa0797
Changes sender and subject lines for missed message emails.
...
Now, in the event of messages between two other members of a huddle,
the missed message emails are threaded in "Group PMs with name1 and
name2" and not in separate threads by sender.
Also, now the order of recipients in get_display_recipient consistent
with the order of names that appears in the list of personal messages
on the left sidebar.
Fixes most of #4553 .
2017-05-12 13:29:43 -07:00
Tim Abbott
13a37f74a1
users: Ban names shorter than 3 characters.
...
The empty string is not a reasonable name.
2017-05-11 19:21:51 -07:00
Cory Lynch
68e5898a07
emoji.py: Add restriction that realm emoji must be lowercase.
...
Raises error if emoji name has an uppercase letter in it.
2017-05-11 19:10:21 -07:00
Umair Khan
329b377e6a
push_notification: Add uses_notification_bouncer().
...
This function abstracts the logic to ascertain if we are using
notification bouncer service or not. Makes our code more
maintainable.
2017-05-11 12:04:16 -07:00
Umair Khan
112a67097b
push_notifications: Don't get alert message.
...
Now we set the alert message in the payload functions for both GCM and APNs so
no need to get it here.
2017-05-11 12:04:16 -07:00
Umair Khan
3c32bc6d8a
push_notification: Create get_gcm_payload.
2017-05-11 12:04:16 -07:00
Umair Khan
d90774b9db
push_notifications: Create get_apns_payload.
...
This function creates the payload that we will send to APNs.
2017-05-11 12:04:16 -07:00
Umair Khan
5ff7fdf83a
push_notification: Create get_alert_from_message.
...
This function returns the alert shown by iOS or Android device.
2017-05-11 12:04:16 -07:00
Umair Khan
10ed47156d
api_auth: Use is_remote_server.
2017-05-11 12:02:26 -07:00
Umair Khan
252fa53816
api: Add is_remote_server().
...
This function abstracts the logic to ascertain the source of API
auth request.
2017-05-11 12:02:26 -07:00
Tim Abbott
e8eaec0a18
mypy: Fix various errors caught by removing cache_with_key.
2017-05-10 14:37:20 -07:00
Tim Abbott
a85c066722
confirmation: Fix race with invite and email change.
2017-05-10 14:31:24 -07:00
Tim Abbott
248785e66e
integrations: Fix missing links to non-webhook integrations.
...
Apparently help_content was attached to the wrong class.
Fixes #4744 .
2017-05-10 11:17:56 -07:00
Tim Abbott
9f7236eec1
message: Remove unused old gravatar_hash field from message dicts.
...
This was deprecated and replaced some 4 years ago.
2017-05-09 22:33:27 -07:00
Tim Abbott
e3505bd5ae
avatar: Fix memcached query loop fetching messages.
...
This fixes a major performance issue, where we would fetch
user_profile objects inside a code path that had already bulk-fetched
the necessary user objects.
Like the similar related changes we just made, the fix is to marshall
and pass the data into the avatar library directly.
2017-05-09 22:33:27 -07:00
Tim Abbott
0990246289
avatar: Fix memcached query loop fetching bots.
...
Similar to the related issue with users, the new avatar storage had
accidentally added database queries in a loop to this code path.
2017-05-09 22:33:27 -07:00
Tim Abbott
8e47dc73bd
avatar: Fix loop doing database queries in register.
...
Due to the refactoring of the avatar URL codepath that added realm IDs
to the URLs, we ended up calling `get_user_profile_by_email` inside
`get_avatar_url`, which in turns was called in a loop over all users
in a realm.
Needless to say, this resulted in a significant performance problem.
We fix this issue by passing in the data needed to compute the avatar
URL, rather than looking it up by email address.
2017-05-09 22:33:27 -07:00
Tim Abbott
676d4f32fc
avatar_url: Fix unnecessary database query.
...
If we have a user_profile object, there's no reason to fetch it again
from memcached.
2017-05-09 22:33:27 -07:00
Tim Abbott
c8b0ac0a05
avatar_hash: Extract user_avatar_path_from_ids.
2017-05-09 22:31:24 -07:00
Rohitt Vashishtha
0414ac6df5
bugdown: Convert GitHub image-preview urls to image urls.
...
This makes inline image previews work for links to image files' pages
on GitHub.
Fixes #4658 .
2017-05-09 11:22:37 -07:00
Umair Khan
4971b7ff9f
testing: Add errored tests to failed tests list.
...
Fixes : #4716 .
2017-05-09 09:36:59 -07:00
Steve Howell
3b2a3601c1
tests: Add ZulipTestCase.notification_bot().
2017-05-08 11:57:38 -07:00
Steve Howell
942db9b6c5
tests: Added ZulipTestCase.example_user() function.
...
The example_user() function is specifically designed for
AARON, hamlet, cordelia, and friends, and it allows a concise
way of using their built-in user profiles. Eventually, the
widespread use of example_user() should help us with refactorings
such as moving the tests users out of the "zulip.com" realm
and deprecating get_user_profile_by_email.
2017-05-08 11:57:38 -07:00
Aditya Bansal
0999a74ef7
pep8: Add compliance with rule E261 to unminify.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
724c6d384f
pep8: Add compliance with rule E261 to type_debug.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
76d28a7cc7
pep8: Add compliance with rule E261 to timeout.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
6ad22f4092
pep8: Add compliance with rule E261 to streams.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
babdb8dd64
pep8: Add compliance with rule E261 to statistics.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
df2b49af66
pep8: Add compliance with rule E261 to sessions.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
94b7e4de9e
pep8: Add compliance with rule E261 to rest.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
19adf85d00
pep8: Add compliance with rule E261 to request.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
f7f09df773
pep8: Add compliance with rule E261 to rate_limiter.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
e5bf7e81e6
pep8: Add compliance with rule E261 zerver/lib/queue.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
69cf11d786
pep8: Add compliance with rule E261 to push_notifications.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
d561c758cd
pep8: Add compliance with rule E261 to parallel.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
cbaace87cd
pep8: Add compliance with rule E261 to email_mirror.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
3687dcdb3f
pep8: Add compliance with rule E261 digest.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
0fc16273b9
pep8: Add compliance with rule E261 to ccache.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
101d334b80
pep8: Add compliance with rule E261 to camo.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
e7e7c1a3cd
pep8: Add compliance with rule E261 to cache_helpers.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
821be4519c
pep8: Add compliance with rule E261 to cache.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
1e61e734c8
pep8: Add compliance with rule E261 to bulk_create.py.
2017-05-07 23:21:50 -07:00
Aditya Bansal
c23901c3a8
pep8: Add compliance with rule E261 to fenced_code.py.
2017-05-07 23:21:50 -07:00
Rishi Gupta
8321bd3f92
notifications: Refactor missed message queue to use send_email.
...
This commit also changes the sender from "Zulip <NOREPLY_EMAIL_ADDRESS>" to
NOREPLY_EMAIL_ADDRESS when it is not set explicitly.
2017-05-05 14:38:25 -07:00
Rishi Gupta
fda65b3b37
missed messages: Change subject to always use the plural for Zulips.
...
Works better for threading in email clients.
2017-05-05 14:38:25 -07:00
Rishi Gupta
60e0bb3a04
send_email: Add reply_to argument to send_email.
...
django.core.mail.send_mail doesn't support reply_to, so we have to switch to
EmailMultiAlternatives.
2017-05-05 14:38:25 -07:00