Commit Graph

4097 Commits

Author SHA1 Message Date
Rishi Gupta 6ba11785ea js dependencies: Change hashchange_encode to hash_util_encode in zerver.
This function formerly replicated the behavior of hashchange.encode, and now
replicates the behavior of hash_util.encode.
2017-03-18 20:40:34 -07:00
Rishi Gupta 19d8d16126 js dependencies: Split hash_util.js from hashchange.js. 2017-03-18 20:40:34 -07:00
Tim Abbott 767f57ef03 tests: Remove imports of deleted message_ids. 2017-03-18 20:40:34 -07:00
K.Kanakhin 3e397090e1 user-presence: Add client info to aggregated presence status.
Fixes zulip/zulip-android#454.
2017-03-18 20:36:41 -07:00
Tim Abbott 4dbb17db64 test_helpers: Remove unused message_ids function. 2017-03-18 19:22:49 -07:00
Elliott Jin 1138057209 test-backend: Raise zerver/views/registration.py test coverage to 100%. 2017-03-18 18:11:59 -07:00
Elliott Jin 25d9aac016 registration.py: Don't catch exception that can't be thrown.
A previous commit changed a `get` (which can throw `DoesNotExist`) to use an
existing object, but kept the `try` / `except` block:

4bf3ace444

Removing this unused code path allows us to achieve 100% test coverage.
2017-03-18 18:11:59 -07:00
Elliott Jin 8cfc231d03 tests: Raise zerver/views/registration.py test coverage (part 2). 2017-03-18 18:11:59 -07:00
Jacob Hurwitz 8ab88f5aad Remove hack for old mobile clients
This FIXME was added in 50d229fe11.
Considering it's been more than 4 years, we can probably safely remove
it now.
2017-03-18 18:11:17 -07:00
Susan Salituro a2689d6952 message.py: Delete unused function. 2017-03-18 16:08:36 -07:00
Elliott Jin fde1aa506b tests: Prevent misuse of assert_in_success_response.
Changing assert_in_success_response to require List[Text] instead of
Iterable[Text] prevents the following misuse:

    self.assert_in_response_success("message", response)

Currently, this will check whether 'm', 'e', 's', 'a', and 'g' separately
appear in the response, which is probably not the intended behavior.  The
correct usage is as follows:

    self.assert_in_response_success(["message"], response)
2017-03-18 15:49:35 -07:00
Susan Salituro a2d948f2e0 test_messages: Add test for invalid markdown format. 2017-03-18 14:35:53 -07:00
dattatreya303 a61ff3e234 Prevent missed-message emails for deleted messages.
This of course only works in the 2 minute window where missed-message
emails are planned, but nonetheless likely avoids common cases of
emailing users with deleted messages.

Fixes: #3873.
2017-03-18 07:51:32 -07:00
Umair Khan 645d7c295c Timezone should default to empty string.
Related to #1506
2017-03-17 21:57:16 -07:00
Tim Abbott 25488b550f casper: Fix issues with server autoreloading on save.
This fixes an issue where if you saved a Python file (even just
changing whitespace) while casper tests were running, the Tornado
server being used would restart, triggering a confusing error like
this:

ReferenceError: Can't find variable: $
Traceback:
  undefined:2
  :4
Suite explicitly interrupted without any message given.
2017-03-17 20:45:07 -07:00
Tim Abbott 614391908b typing: Add apply_event handler for typing notifications.
This fixes a crash in the small race condition when loading a browser
window while someone is starting/stopping typing.
2017-03-17 20:01:12 -07:00
Umair Khan 4442703011 jinja2: No need for custom render_to_response.
Django 1.10 has changed the implementation of this function to
match our custom implementation; in addition to this, we prefer
render().

Fixes #1914 via #4093.
2017-03-17 13:57:34 -07:00
Umair Khan d4ee102a95 users: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 62a580a37f unsubscribe: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 446c06bbf4 registration: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 58b407e2ff integrations: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 097b0e3979 home: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 4e2311544f auth: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 97639e5e48 middleware: Change render_to_response to render.
Related to #4093
2017-03-17 13:52:59 -07:00
Umair Khan 14c2b40acc unsubscribe.py: Pass request to process_subscribe.
We are changing render_to_respone to render; render takes
request as an argument.
2017-03-17 13:52:59 -07:00
Akash Kothawale 9e45f32275 gogs: Add webhook integration.
- Add push, create and pull request event.
- Handle 'opened', 'closed' and 'merged' in 'pull request' event.
- Include tests for all the above events including 'push' with commits
  more than limits.
2017-03-17 12:22:06 -07:00
Akash Kothawale 9c5f1d2239 git.py: Add create branch event message. 2017-03-17 12:22:06 -07:00
Akash Kothawale edfb9c21bc github_webhook: Send test message sent by GitHub webhook integration.
Fixes #3994.
2017-03-17 11:47:04 -07:00
Akash Kothawale 282d27a934 git.py: Add setup webhook message. 2017-03-17 11:44:01 -07:00
wizsid11 19d1f4cab7 git integration: Change push commits message to show url at the end. 2017-03-16 11:06:03 -07:00
Rohitt Vashishtha 202389d4a7 notifications: Fix incorrect advertising in missed-message emails.
Missed-message email replies using the reply-to of
noreply@zulipchat.com shouldn't advertise that "just replying" will
work.

Rebased and commit message rewritten by tabbott.

Fixes #3965.
2017-03-15 22:34:31 -07:00
Tim Abbott 1c5e9ae7f6 mypy: Fix unicode error in Jira webhook. 2017-03-15 22:01:04 -07:00
Tomasz Kolek 51b839ac11 jira integration: Add support for unicode chars.
Fixes: #3967
2017-03-15 16:26:57 -07:00
kunall17 5a1e952cb5 Implemented test's for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
kunall17 a908bb1898 Implemented API routes for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
Cynthia Lin 589551b6ee settings: Change "Custom alert words" to "Alert words". 2017-03-15 11:25:37 -07:00
Umair Khan 242d3ffaf4 Add timezone field in UserProfile.
Implements backend of #1506.
2017-03-15 11:18:24 -07:00
Umair Khan 0d296afa54 github: Return '' when name is None. 2017-03-15 11:11:09 -07:00
Umair Khan e44e58f6d5 logging: Skip log records originated in site packages.
This fixes the huge exception we get in our logs from django.template
logger. This exception is a known bug in Django, see
https://code.djangoproject.com/ticket/26886

Fixes #3974
2017-03-15 11:07:31 -07:00
Rishi Gupta af4718c50c retention.py: Remove use of domain from get_expired_messages.
get_expired_messages seems to only be used by tests anyway.
2017-03-14 17:17:42 -07:00
Rishi Gupta 92dd767519 management commands: Change help text to say realm instead of domain. 2017-03-14 17:17:42 -07:00
Rishi Gupta 0c032adbde create_realm.py: Remove --domain option.
Realm domains can now be managed via Admin Settings in the web app.
2017-03-14 17:17:42 -07:00
Rishi Gupta 8fecd454aa forms.py: Remove unused function get_registration_string(domain). 2017-03-14 17:17:42 -07:00
Raghav Jajodia ef7e15ee00 admin: Add realm option to prevent users from changing their name.
A realm option to prevent users from changing their name is added.
Fixes #3950.
2017-03-14 14:10:08 -07:00
Raghav Jajodia dc48b87765 home.py: Fix bug associated with email_changes_disabled.
On reloading the page after disabling email changes does not check
the "Prevent users from changing their email address".
Adding realm_email_changes_disabled to page_params_core_fields fixes the problem.
2017-03-14 14:10:08 -07:00
wizsid11 f066e3e8d6 git integrations: Change the limit of shown commits from 10 to 20. 2017-03-14 13:24:45 -07:00
Umair Khan cdb07c7005 Fix test_get_old_messages_with_narrow_pm_with.
Fixes #3940.
2017-03-14 09:38:24 -07:00
Umair Khan 7b1742fdef send_message: Allow message to be sent to a huddle. 2017-03-14 09:35:08 -07:00
Maxim Averin b13b660709 zerver: Replace log_event with RealmAuditLog in do_change_user_email.
This replaces the ancient file logging approach for the auditable
password change event with the database audit log.
2017-03-13 22:08:12 -07:00
Maxim Averin fc35982b87 zerver: Replace log_event with RealmAuditLog in do_change_password.
This replaces the ancient file logging approach for the auditable
password change event with the database audit log.
2017-03-13 22:07:14 -07:00