Tim Abbott
594451707d
check_capped_string: Clean up corner case.
...
We were rejecting strings of length equal to the max.
While we're at it, fix the unnecessary period in the error message,
which doesn't align with similar validators.
2018-05-03 14:30:03 -07:00
Rishi Gupta
42a99e8c1d
zilencer: Rename remote_server_unregister_push.
2018-05-03 12:50:29 -07:00
Rishi Gupta
76650f5930
zilencer: Rename remote_server_register_push to register_remote_push_device.
2018-05-03 12:50:29 -07:00
Eeshan Garg
d28d08e7da
streams: Add get_default_value_for_history_public_to_subscribers().
...
This commit adds a function that makes it easier to get a default
value for Stream.history_public_to_subscribers when one isn't
explicitly provided.
2018-05-03 10:24:27 -07:00
Aditya Bansal
75d76e4eb3
lib/streams.py: Extract get_stream_by_id as a separate function.
...
We extract get_stream_by_id function out of the body of
access_stream_by_id function to help us access streams for archives.
2018-05-02 15:23:33 -07:00
Aditya Bansal
9629be689b
populate_db: Add a web public stream to dev database.
...
We flip the Stream "Rome" to be a web public stream. Also we add
attribute is_web_public in various stream dicts and in the
bulk_create_streams function of bulk_create.py responsible for
default stream creation in dev environment.
2018-05-02 15:23:33 -07:00
Aditya Bansal
1f358954be
web_public_streams: Add is_web_public to Stream table.
...
Also add function do_change_stream_web_public in lib/actions.py
to help in changing a streams web public status.
2018-05-02 15:23:33 -07:00
novokrest
0fb13eed2f
outgoing_webhook: Extract success response handling to separate method.
...
Extract success response handling in do_rest_call() method to
separate method process_success_response()
2018-05-02 11:57:26 -07:00
novokrest
036bc120c3
outgoing_webhook: Extend process_success() return value to tuple.
...
Change return value type of OutgoingWebhookServiceInterface.process_success
to 2-elements tuple as (success_message, failure_message)
2018-05-02 11:57:08 -07:00
Tim Abbott
4df886f36f
populate_db: Fix initialization of history_public_to_subscribers.
...
This was being incorrectly not initialized properly in the test suite,
because we neglected to update the bulk_create code path for creating
streams.
2018-05-02 09:02:57 -07:00
Tim Abbott
866cb38270
test_classes: Compute history_public_to_subscribers correctly.
...
We apparently missed updating this when we split out this database field.
2018-05-02 09:02:57 -07:00
Rohitt Vashishtha
2f6da2661f
push_notifications: Format blockquotes properly in text_output.
...
New output is of the format:
Hamlet said:
> Polonius said:
> > This is the.
> > Second layer of nesting.
> First layer of nesting.
Fixes #9251 .
2018-05-02 08:57:17 -07:00
Tim Abbott
c1432d9dfc
slack import: Reformat UserProfile to one-line-per-field.
...
This should be more readable and convenient for future editing.
2018-05-01 09:16:12 -07:00
Tim Abbott
a2f49b425b
slack import: Fix some erroneous UserProfile field values.
...
* tutorial_status was the invalid value 'T'; should be the default of 'W'.
* last_reminder can be just the default None
* enable_desktop_notifications was just the model default of True.
2018-05-01 09:14:47 -07:00
Rhea Parekh
f00b80058d
slack import: Remove unwanted comments.
2018-05-01 09:09:36 -07:00
Rhea Parekh
e579bef8fd
slack import: Improve how we construct user_profile objects.
...
Fixes #9260
2018-05-01 09:09:36 -07:00
Angelika Serwa
f4f64243dd
custom_profile_fields: Support changing the sort order of the fields.
...
Tweaked by tabbott for variable naming and the URL.
Closes #8879 .
2018-04-30 18:17:41 -07:00
Yashashvi Dave
4033f210af
custom fields: Add support for custom date field type.
2018-04-30 23:04:25 +05:30
Yashashvi Dave
66759358e2
create stream: Add maxlength restriction on name and description.
2018-04-30 10:11:25 -07:00
Tim Abbott
976e61d687
validators: Improve error messages for check_capped_string.
2018-04-30 10:07:06 -07:00
Yashashvi Dave
7bbe44d7a0
org settings: Remove "Delete streams" administrative tab from settings.
...
Fixes #9227
2018-04-30 17:47:34 +05:30
Eeshan Garg
057ff9c91e
models: Add Stream.history_public_to_subscribers.
...
This commit adds a new field history_public_to_subscribers to the
Stream model, which serves a similar function to the old
settings.PRIVATE_STREAM_HISTORY_FOR_SUBSCRIBERS; we still use that
setting as the default value for new streams to avoid breaking
backwards-compatibility for those users before we are ready with an
actual UI for users to choose directly.
This also comes with a migration to set the value of the new field for
existing streams with an algorithm matching that used at runtime.
With significant changes by Tim Abbott.
This is an initial part of our efforts on #9232 .
2018-04-28 22:54:04 -07:00
Tim Abbott
7d6bb3dcb4
settings: Remove obsolete default_desktop_notifications setting.
...
This actually hasn't been hooked up to do anything in years.
While we're at it, we remove the entire "Zulip Labs" settings page.
2018-04-28 13:46:07 -07:00
Tim Abbott
127ac0df54
auth: Remove unnecessary case from validate_email_for_realm.
...
The removed code path was only needed due to buggy setup code in the
test_cross_realm_scenarios test. We address that with a less buggy
workaround, and which lets us remove unnecessary complexity from this
important validation function.
Thanks for Umair Waheed for some preliminary work on this.
Fixes #7561 .
2018-04-28 11:03:03 -07:00
YJDave
6bef44a9fa
org setting: Add time limits for message deleting.
...
Add realm setting to set time limit for message deleitng.
Set default value of message_content_delete_limit_seconds
to 600 seconds(10 min).
Thanks to Shubham Dhama for rebasing and reworking this. Some final
edits also done by Tim Abbott.
Fixes #7344 .
2018-04-27 19:22:28 -07:00
Eeshan Garg
7d14ce2cb6
pypi packaging: Upgrade to release 0.4.6.
...
As a part of the upgrade, we had to update our API tests in
zerver/lib/api_test_helpers.
2018-04-27 14:50:25 -07:00
Tim Abbott
abef9f203b
api: Don't use ujson library unecessarily.
...
ujson is very fast, but doesn't provide good error messages for
parsing errors.
2018-04-27 14:49:46 -07:00
Eeshan Garg
bd2270eecb
test-api: Add test helpers that pretty-print JSON output.
2018-04-27 14:49:34 -07:00
Vishnu Ks
f140b0e870
emails: Add translation tags to invitation.
2018-04-27 11:59:36 -07:00
Tim Abbott
2cdd367d49
email_mirror: Fix handling of empty topic.
...
Also fixs some corner cases around pure-whitespace topics, and
migrates from the years-obsolete "no subject".
Fixes #9207 .
2018-04-26 10:21:29 -07:00
Umair Khan
cf2f6b38dd
profile: Add choice field.
...
Fixes part of #8878
2018-04-26 00:35:51 -07:00
Umair Khan
4ea3e8003a
profile: Create mypy types for profile data.
...
This makes the code more readable.
2018-04-25 23:28:27 -07:00
Tim Abbott
b40780d003
mypy: Fix errors in new bugdown module.
...
I introduced these when making final changes before merging.
2018-04-25 15:56:46 -07:00
Lyla Fischer
0f3cb14aae
user docs: Use {settings_tab} macro for more organization settings.
2018-04-25 14:39:30 -07:00
Lyla Fischer
dbc573584b
user docs: Use the {settings_tab} macro for four organization settings.
2018-04-25 14:39:30 -07:00
Lyla Fischer
b2be1a67f8
help docs: Add {settings_tab} for the first three org settings.
2018-04-25 14:39:30 -07:00
Lyla Fischer
68f68bf56d
help docs: Use {settings_tab} macro for some user settings.
2018-04-25 14:39:30 -07:00
Lyla Fischer
a4ea71ec0f
help docs: Use {settings_tab|notifications} macro.
2018-04-25 14:39:30 -07:00
Lyla Fischer
d40f246599
help docs: Use {settings_tab|display-settings}.
2018-04-25 13:51:29 -07:00
Lyla Fischer
b24659b005
bugdown: Add {settings|my-setting} macro.
...
Tweaked by tabbott to add a test and fix a super subtle issue with the
relative_settings_link variable having been set once the first time a
/help article was rendered.
2018-04-25 13:41:24 -07:00
Tim Abbott
ff9371d63c
slack import: Fix issues with Slack empty files.
...
Fixes #9217 .
2018-04-25 10:20:55 -07:00
neiljp (Neil Pilgrim)
9692a8572d
mypy: Add assertion in timeout.py.
2018-04-25 08:58:55 -07:00
Rishi Gupta
718a87bd47
emails: Update followup_day1.
2018-04-25 08:52:29 -07:00
Tim Abbott
62fb139af7
Revert "test_fixtures: Add settings files to things that require reprovision."
...
This reverts commit 2bc51931a8
.
See #9210 for the follow-up work needed before we can re-add this.
2018-04-24 11:01:20 -07:00
Preston Hansen
efc7967355
slack import: Update `build_zerver_realm` to use `Realm` defaults.
...
Fixes #9131 .
2018-04-23 17:15:51 -07:00
Vishnu Ks
134fdd8fd0
bugdown: Replace vimeo link with video title.
2018-04-23 17:04:24 -07:00
Vishnu Ks
5671cef6d0
bugdown: Cleanup Vimeo preview.
2018-04-23 17:04:24 -07:00
Tim Abbott
c4b886d8ae
import: Split out import.py into its own module.
...
This should make it a bit easier to find the code.
2018-04-23 15:21:12 -07:00
Vishnu Ks
c9e932a7ce
settings: Add support for Hangouts as the video chat provider.
...
The only thing that's annoying about this feature is that you need to
be a paying G Suite customer to use it.
2018-04-23 09:39:47 -07:00
Tim Abbott
01be6b01b1
validate_domain: Add verification of domain length.
2018-04-23 09:29:03 -07:00