Tim Abbott
97abaae9af
home: Remove now-unnecessary page_params_core_fields duplication.
...
Also, we update the documentation to make the overall system a bit
clearer.
Fixes #4628 .
2017-05-13 22:58:18 -07:00
Tim Abbott
f36000d670
docs: Fix last reference to old fixtures directory structure.
2017-05-13 21:39:12 -07:00
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
acb3c1e7ff
test_templates: Fix errors from compare.html template.
2017-05-13 14:57:06 -07:00
Eeshan Garg
10dcc99983
zerver/decorators: Log all exceptions raised in api_key_only_webhook_view.
...
Fixes #4742 .
2017-05-13 14:53:47 -07:00
Tim Abbott
51978d0f89
tests: Fix failing login tests.
...
Apparently I missed these when updating
4d2bb0dec8
.
2017-05-13 13:05:15 -07:00
Tim Abbott
4d2bb0dec8
templates: Clean up visuals for account-not-found SSO flow.
...
Also, clarify that the account that isn't found is your Zulip account,
not a GitHub/Google Oauth account.
2017-05-13 12:46:05 -07:00
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
25516c6949
models: Update comment explaining order of display recipients.
2017-05-12 13:53:06 -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
b1bfe9f42e
Add migration to force lowercase existing realm emoji.
...
Since realm emoji are now required to be lowercase,
an appropriate migration was added to retroactively
fix any emoji that might have contained uppercase
letters.
Also, the validator on the model was changed to
reject uppercase letters.
2017-05-11 19:10:21 -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
Tim Abbott
6eada74bfe
portico: Fix exception if no realm description is set.
...
This was caught via Casper tests, which I regret not running.
2017-05-11 14:23:46 -07:00
Tim Abbott
223624be25
settings: Add support for longer, markdown-powered realm descriptions.
...
This makes it possible to create much prettier login pages.
Further work on styling may be necessary.
2017-05-11 13:59:46 -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
faf190ff34
validate_api_key: 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
Umair Khan
dc2a9a4c5b
github: Add sign up button on registration page.
2017-05-10 17:49:08 -07:00
Umair Khan
d56db0a3b4
auth.py: Add confirmation handlers for signup.
...
These handlers will kick into action when is_signup is False. In case
the account exists, the user will be logged in, otherwise, user will
be asked if they want to proceed to registration.
2017-05-10 17:20:34 -07:00
Umair Khan
11426a2cec
log_into_subdomain: User should be None in signup.
2017-05-10 17:20:34 -07:00
Tim Abbott
5019b53492
auth: Pass is_signup option around.
2017-05-10 17:20:34 -07:00
Tim Abbott
ce3974b40e
auth: add is_signup option to login_or_register_remote_user.
2017-05-10 17:20:34 -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
e55b4b0d43
invites: Fix buggy access to non-existant user_profile.name.
2017-05-10 14:31:24 -07:00
Tim Abbott
a85c066722
confirmation: Fix race with invite and email change.
2017-05-10 14:31:24 -07:00
Tim Abbott
a0a50d410c
test_docs: Add tests to ensure all integrations present.
2017-05-10 11:30:32 -07:00
Tim Abbott
a3ddd94aa3
integrations: Remove unnecessary email_integration_enabled.
...
Previously, we were ending up with 2 copies of the email integration
in there.
2017-05-10 11:24:25 -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
232592cc9f
test_sessions: Extends tests to reach 100% coverage of sessions.py.
...
Fixes #3980 .
2017-05-10 10:12:21 -07:00
andrewallen00
53f1f75fcb
Add tests for zerver/lib/sessions.py.
2017-05-10 10:12:14 -07:00
Tim Abbott
0e05f3f4ee
emails: Remove pre-email-migration scheduled jobs.
...
This fixes an issue introduced when we migrated the format of all of
our emails, which caused any old ScheduledJob rows to be corrupted.
2017-05-10 09:45:40 -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
Tim Abbott
bd3e338c35
templates: Fix URL coverage for new files.
2017-05-09 18:42:24 -07:00
Tim Abbott
fc24a56fc5
test_docs: Fix expected text in /hello page.
2017-05-09 17:23:38 -07:00
Tim Abbott
df6dba9673
test_home: Fix expected text in /hello page.
2017-05-09 16:59:33 -07:00
Tim Abbott
2d97db3518
streams: Add endpoint for modifying properties of a single stream.
...
This is likely to be the more common endpoint for API clients like the
mobile apps to interact with when modifying streams.
2017-05-09 13:42:34 -07:00
kunall17
e087bc24f8
streams: Migrate stream property changes to new REST endpoint.
...
This is one of the last major endpoints that were still done in the
pre-REST style.
While we're at it, we change the endpoint to expect a stream ID, not a
stream name.
2017-05-09 13:39:23 -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