Umair Khan
8f316183e0
tests: Make import error tracebacks terse.
...
This will also disable exception chaining; we do not need it here.
2018-01-19 06:02:05 -05:00
Vishnu Ks
7dbb4cdae2
uploads: Remove ExceededQuotaError class.
...
We are no longer using it.
2018-01-18 15:38:08 -08:00
Tim Abbott
2c16c76551
beeminder: Fix buggy coding tag at top of file.
2018-01-18 09:07:06 -08:00
Umair Khan
a994dba583
tests: Give more descriptive import error.
...
This code takes care of the environment running Python 3.4 when
test label is passed directly to the test-backend command:
./tools/test-backend test_alert_words
2018-01-18 07:13:26 -05:00
Umair Khan
0eda941822
tests: Verify imports in test modules.
2018-01-18 07:13:26 -05:00
Umair Khan
7248a3366b
tests: Change print_error_message to check_import_error.
2018-01-18 07:13:26 -05:00
Umair Khan
f3c86c9e58
tests: Remove old import testing code.
...
We will add the modified version of this code in the next commit.
2018-01-18 07:13:26 -05:00
Umair Khan
c26cdee95d
get_test_names: Update to accept ParallelTestSuite arg.
2018-01-18 07:13:26 -05:00
Alena Volkova
aa58e1fcda
tests: Make import failure error messages more consistent.
2018-01-18 07:13:26 -05:00
Alena Volkova
13b1334fe4
tests: Refactor error handling of import failures.
2018-01-18 07:13:26 -05:00
Greg Price
3d423a3c7b
logging: Fix corrupted default format for our logfiles.
...
This was changed by accident when the syntax was rearranged,
in 3f4bf2d22
"zerver/lib: Use python 3 syntax for typing"
back in November.
2018-01-17 18:10:17 -08:00
Shubham Dhama
797fa62fde
test auth.py: Add tests for json_fetch_api_key function.
2018-01-17 15:15:51 -05:00
infinitelooped
252a485621
integrations: Add documentation for Groove.
2018-01-17 13:00:11 -05:00
Privisus
e5fc49e23a
integrations: Add documentation for Raygun.
2018-01-17 12:53:22 -05:00
Privisus
c758636c1e
integrations: Add webhook code, API endpoint, and tests for Raygun.
2018-01-17 12:53:22 -05:00
Rhea Parekh
7153d20205
slack importer: append Message id from the db.
2018-01-17 11:46:27 -05:00
Rhea Parekh
58f1f0e13e
slack importer: append Recipient id from the db.
...
Recipient id should be updated from the database,
otherwise there will be foreign key clashes.
2018-01-17 11:46:27 -05:00
Rhea Parekh
138aba3d89
slack importer: Add unit tests for slack message conversions.
2018-01-17 09:38:53 -05:00
Rhea Parekh
c86411d9a2
slack importer: Move message conversions to a new module.
2018-01-17 09:38:53 -05:00
Rhea Parekh
c1d336f5d1
slack importer: Refactor checking for availability of realm subdomain.
2018-01-17 09:38:53 -05:00
Ricky
a90e99dd3e
webhooks: Add Beeminder webhook.
2018-01-17 09:24:12 -05:00
fredfishgames
4cb9edecda
integrations: Add documentation for Opbeat.
2018-01-17 09:17:19 -05:00
fredfishgames
4e2b99a98b
integrations: Add webhook code, API endpoint, and tests for Opbeat.
2018-01-17 09:17:19 -05:00
Shreyansh Dwivedi
b0fb7aa6b2
bugdown: Add preview for vimeo videos.
...
This also amends a commit from Brock Whittaker <brock@zulipchat.com>
that merges two separate functions for YouTube videos and Vimeo videos
into a generic video recall function.
Fixes #7550 .
2018-01-17 09:11:43 -05:00
Eeshan Garg
457c5a7735
webhooks/gci: Support 'outoftime' event.
...
This commit adds support for the 'outoftime' event. Such an event
is triggered when the task deadline for a particular task has
passed.
2018-01-16 15:57:35 -08:00
Viraat Chandra
64034241a0
webhooks: Create Intercom integration and docs.
2018-01-16 08:51:17 -05:00
Xavier Cooney
8c5e74afe9
test_messages.py: Remove unecessary imports.
2018-01-16 08:16:43 -05:00
Xavier Cooney
b0f501ff6c
test_helpers.py: Remove unecessary imports.
2018-01-16 08:16:43 -05:00
Xavier Cooney
0c48f5bf09
test_classes.py: Remove unecssary imports.
2018-01-16 08:16:43 -05:00
XavierCooney
35dc203d58
queue_processors.py: Remove unecessary imports.
2018-01-16 08:16:43 -05:00
Robert Hönig
93f47fa700
outgoing webhooks: Rename "Base URL" to "Endpoint URL".
...
Based on user feedback. "Endpoint URL" gives a clearer
idea of the field's purpose.
2018-01-16 08:11:51 -05:00
Sivagiri Visakan
aeeb9d07a8
integrations: Handle errors in Groove payloads.
2018-01-16 07:31:50 -05:00
Eeshan Garg
a14b52ef1d
api docs: Document the `DELETE /users/me/subscriptions` endpoint.
...
Note that there is currently no JavaScript method in zulip-js
to call this endpoint.
2018-01-12 07:30:38 -05:00
Eeshan Garg
8c723e8c27
api docs: Document the POST /api/v1/users endpoint.
...
Note that there is no JavaScript equivalent for requesting this
endpoint in zulip-js yet.
2018-01-12 07:30:38 -05:00
Kiy4h
68d86b62fa
integrations: Add webhook payloads for rollbar.
2018-01-11 06:32:37 -05:00
Xavier Cooney
e417a99830
webhooks/gitlab: Support topic parameter to specify a topic.
...
Fixes #7743 .
2018-01-11 06:29:55 -05:00
Aditya Bansal
ec1297c1e8
schedulemessages: Add delivery system for scheduled message.
2018-01-10 09:18:02 -05:00
Aditya Bansal
c64766e55e
scheduledmessages: Add funcs to verify and schedule messages.
...
We add two functions:
1.) check_schedule_message(): This function is responsible for
doing the essential initial checkes to verify the validity of
the message. These checkes include things like if user is
allowed to send messages to some stream or not or if the user is
a super_user. All this is basically done by further calling
check_message() with appropriate parameters. This is on the same
lines as is check_send_message().
2.) do_schedule_messages(): This function is responsible for
creating ScheduleMessage table rows for a list of messages that
are to be scheduled. This basically accumulates the ScheduleMessage
objects in a list and then bulk creates the rows.
2018-01-10 09:18:02 -05:00
Aditya Bansal
6c36cf3c82
scheduledmessages: Add model for the ScheduledMessage table.
2018-01-10 09:18:02 -05:00
Andy Perez
c209069fcd
bugdown: Improve image inlining logic.
...
Fix #7537
2018-01-09 16:43:22 -05:00
Robert Hönig
d1d8365a6b
embedded bots: Add config data UI.
...
This adds UI fields in the bot settings for specifying
configuration values like API keys for a bot. The names
and placeholder values for each bot's config fields are
fetched from the bot's <bot>.conf template file in the
zulip_bots package. This also adds giphy and followup
as embedded bots.
2018-01-09 11:50:54 -05:00
infinitelooped
ffa7637215
integrations: Add webhook code, API endpoint, and tests for Groove.
2018-01-09 09:32:52 -05:00
Alena Volkova
9d1063d362
urls: Move the json/fetch_api_key endpoint to be an API-style route.
2018-01-08 13:15:52 -05:00
Alena Volkova
7c22045158
test_decorators: Replace the json/fetch_api_key endpoint in tests.
...
This endpoint is about to become an API-style route and have the legacy
decorator removed from its view. Other endpoints will be used in tests
instead of it.
2018-01-08 13:15:52 -05:00
Rhea Parekh
b583f1f0ff
slack importer: Add regex for markdown mapping.
...
* For strikethrough formatting: Slack's '~strike~' to Zulip's '~~strike~~'.
* For bold formatting: Slack's '*bold*' to Zulip's '**bold**'.
* For italic formatting: Slack's '_italic_' to Zulip's '*italic*'.
* For mentioning formatting: Slack's <@slack_id|short_name> to Zulip's @**full_name**.
* Checking links.
2018-01-08 08:05:50 -05:00
Rhea Parekh
a6e0bcd5f6
Slack importer: Map messages and usermessages.
2018-01-08 08:05:50 -05:00
Rhea Parekh
24a86a524b
slack importer: Quiet the unzip command.
2018-01-08 08:05:50 -05:00
Rhea Parekh
4019a456d1
slack importer: Rename messages file.
...
Rename messages file from '/message-000001.json' to
'/messages-000001.json'
2018-01-08 08:05:50 -05:00
Rhea Parekh
400c968b0e
slack importer: Remove unnecessary comment.
2018-01-08 08:05:50 -05:00
Rhea Parekh
c875428a83
slack importer: Extract get_user_full_name() helper.
2018-01-08 08:05:50 -05:00
Robert Hönig
3420ed1fcc
validator.py: Cover missing lines in check_dict().
2018-01-07 15:23:17 -05:00
Eeshan Garg
a01f8c088a
api docs: Document the POST /api/v1/users/me/subscriptions endpoint.
...
There is a JavaScript equivalent for this endpoint but the npm
package has not yet been released.
2018-01-07 15:19:51 -05:00
Eeshan Garg
ae59b08316
api docs: Document the GET /api/v1/users/me endpoint.
...
Note that there is no JavaScript equivalent for requesting this
endpoint in zulip-js yet.
2018-01-07 15:19:51 -05:00
Eeshan Garg
045aacbc67
api docs: Document the PATCH /api/v1/messages/<msg_id> endpoint.
...
Note that there is no JavaScript equivalent for requesting this
endpoint in zulip-js yet.
2018-01-07 15:19:51 -05:00
Eeshan Garg
6f01b042a1
api docs: Document the DELETE /api/v1/events endpoint.
...
Note that there is no JavaScript equivalent for requesting this
endpoint in zulip-js yet.
2018-01-07 15:19:51 -05:00
Robert Hönig
c745d1901c
bot_config.py: Add function for loading config file templates.
...
load_bot_config_template(bot) parses the <bot>.conf
template file, which can be found in the zulip_bots
package for each bot. It then returns the INI content
of that file as a dict.
2018-01-07 20:05:52 +01:00
Robert Hönig
ed7208fd6e
Make EmbeddedBotHandler.get_config_info comply with ExternalBotHandler.
2018-01-07 20:05:52 +01:00
Robert Hönig
9cc059f4aa
bot_config.py: Raise exception when getting config data from bot without config entries.
2018-01-07 20:05:52 +01:00
Robert Hönig
83d0c7be31
embedded bots: Run bot.initialize() if bot has this function.
2018-01-07 20:05:52 +01:00
Robert Hönig
dcd62f92fb
validator.py: Extend functionality of check_dict().
...
With this commit, check_dict() can be used to verify
that all keys and/or values of a dict are of a certain
type.
2018-01-07 20:04:52 +01:00
Vishnu Ks
5cadc6365a
slack importer: Extract data into directory of zip file.
...
Currently the zip file is extracted to the root of
zulip directory no matter where the the zip file.
The extracted data is not useful after running the command
which pollutes the zulip directory. It make more sense to
extract it to the same directory of zip file especially
when the zip file gets downloaded to /temp like in the tests.
2018-01-07 09:50:27 -05:00
Robert Hönig
29a343cb44
Rename BotUserConfigData to BotConfigData.
...
This is in compliance with the naming of
BotStorageData.
2018-01-06 14:13:18 -05:00
Alena Volkova
5bbc46762f
tests: Improve error handling of import failures.
...
Fixes #6776 .
2018-01-05 12:03:37 -05:00
Privisus
4f700ddcbf
integrations: Add webhook payloads for Raygun.
2018-01-04 11:44:39 -05:00
Eeshan Garg
479bc41ca5
api docs: Remove old and outdated endpoint docs.
2018-01-04 10:17:29 -05:00
Eeshan Garg
1fd71287d6
api docs: Document the GET /api/v1/events endpoint.
2018-01-04 10:17:29 -05:00
Vishnu Ks
e6d3f8895f
messages: Create function to calculate first visible message id.
2018-01-04 08:52:40 -05:00
Vishnu Ks
f2a7d44c29
models: Add message_visibility_limit attribute to Realm.
2018-01-04 08:52:40 -05:00
MadElf1337
7c113d185f
integrations: Add webhook payloads for Facebook.
2018-01-03 14:47:50 -05:00
Eeshan Garg
f620525373
api docs: Document the POST /api/v1/register endpoint.
2018-01-03 12:23:30 -05:00
Alena Volkova
45f0c76c44
settings: Limit the creation of generic bots.
...
This commit adds a setting to limit creation of generic bots
to admins for realms that want that restriction. (Generic
bots, apart from being considered spammy on some realms,
have less locked down permissions than webhook bots).
Fixes #7066 .
2018-01-02 18:12:22 -05:00
Eeshan Garg
18c3bec667
webhooks/gci: Support "unassign" event type.
...
This commit adds support for the "unassign" event type, the
payloads for which are generated when a mentor unassigns a student
from a task.
2018-01-02 16:42:00 -05:00
Eeshan Garg
2c7f4d2187
webhooks/gci: Support "extend" event type.
...
This commit adds support for events of type "extend", the payloads
for which are generated when a mentor extends the deadline for a
task.
2018-01-02 16:42:00 -05:00
Aastha Gupta
daf86eb664
settings: Add "text" option to emoji_set model.
...
We no longer have a special UI setting and model
field ("emoji_alt_code") for saying users want text-only
emojis. We now instead make "text" be a fifth choice
for "emojiset".
Fixes #7406
2018-01-02 14:55:01 -05:00
Vishnu Ks
277d463d23
messages: Add option to limit users message history.
2018-01-02 13:45:01 -05:00
MadElf1337
e7f1a9ee34
inetgrations: Add webhook payloads for Honeybadger.
2018-01-02 11:45:33 -05:00
YJDave
fa44d2ea69
settings: Remove autoscroll_forever setting.
...
Fixes #6845
2018-01-02 10:35:49 -05:00
Eeshan Garg
80405747ce
test_docs: Test new API docs (templates/zerver/api/*).
2017-12-30 11:03:23 -05:00
rht
185fd99816
mypy: Use Python 3 type syntax in several files.
2017-12-30 07:34:51 -05:00
rht
1324d9f000
mypy: Use Python 3 type syntax in zerver/views.
2017-12-30 07:34:05 -05:00
rht
2e8adbde12
mypy: Use Python 3 type syntax in zerver/lib/actions.py.
2017-12-30 07:33:07 -05:00
Eeshan Garg
89f622937d
api docs: Generate Arguments table from JSON.
...
This commit does the following:
* Move the Arguments table data from stream-message.md and
private-message.md to a JSON file.
* Add a Markdown extension that allows one to include and render
a table from a JSON file like so:
{generate_arguments_table|arguments.json|private-stream.md}
* Use Bootstrap's .table class to format the table instead of
relying on custom CSS.
2017-12-29 17:03:36 -05:00
Eeshan Garg
94bc9d52d1
api docs: Split usage.md into two separate docs.
...
This commit splits usage.md into two separate docs,
stream-message.md and private-message.md. The arguments and return
values for sending a stream message are somewhat different from
those of sending a private message, so it made sense to split the
two up for clarity.
2017-12-29 17:03:36 -05:00
YJDave
29905ad5d6
create stream: Before sending notificaion, check if NOTIFICATION_BOT exists.
...
There might be case that NOTIFICATION_BOT is none, so before sending stream
announce notification, check first if settings.NOTIFICATION_BOT is not none.
2017-12-29 08:59:55 -05:00
MadElf1337
39fc26deff
integrations: Add webhook payloads for Runscope.
2017-12-29 07:27:20 -05:00
akashnimare
ef51a39552
markdown: Update regex for strikethrough.
...
This uses the correct regex for strikethrough. Also, added
a test to make sure that strikethrough works when it contains
link with whitespace.
Fixes #7596 .
2017-12-28 15:59:04 -05:00
MadElf1337
de62e11c23
integrations: Add webhook payloads for StatusPage.io.
2017-12-28 15:53:06 -05:00
Steve Howell
80477da481
quick fix: Stop tracebacks with missedmessage_hook.
...
A `None` value is not properly handled in this function, which
indicates some lack of testing or a recent regression we don't
understand. We were getting lots of tracebacks from this line
of code on our test server:
mentioned = 'mentioned' in flags and 'read' not in flags
2017-12-28 08:10:56 -05:00
Kiy4h
2e35b7fd60
mypy: Use Python 3 type syntax in zerver/webhooks/taiga/view.py.
2017-12-28 07:26:44 -05:00
Kiy4h
93cc19e3f8
mypy: Use Python 3 type syntax in zerver/webhooks/helloworld/view.py.
2017-12-28 07:26:44 -05:00
Kiy4h
3b7fbc1a1d
mypy: Use Python 3 type syntax in zerver/webhooks/gosquared/view.py.
2017-12-28 07:26:44 -05:00
Kiy4h
6fa51be822
mypy: Use Python 3 type syntax in zerver/views/push_notifications.py.
2017-12-28 07:26:44 -05:00
Kiy4h
64413e3b91
mypy: Use Python 3 type syntax in zerver/views/email_mirror.py.
2017-12-28 07:26:44 -05:00
Kiy4h
238cd2b132
mypy: Use Python 3 type syntax in zerver/views/alert_words.py.
2017-12-28 07:26:44 -05:00
Kiy4h
78e71faefe
mypy: Use Python 3 type syntax in zerver/lib/test_fixtures.py.
2017-12-28 07:26:44 -05:00
Rhea Parekh
ed4054d110
Import script: Check and add system bots after every import.
...
This checks for the existing system bots and adds them if they
aren't included in the import.
2017-12-27 07:52:45 -05:00
Rhea Parekh
62aec0688f
Slack importer: Add slack to zulip data conversion script as a manage.py command.
2017-12-27 07:50:53 -05:00
Rhea Parekh
cd332a7f59
Slack importer: Append ids to the existing ids in the database.
...
For import with the condition `--import-into-nonempty`, the ids
of the mapped data will be appended to the existing ids in the
database.
2017-12-27 07:50:53 -05:00
Rhea Parekh
5b37c5562b
Slack importer: Add the slack to zulip data conversion files.
2017-12-27 07:50:53 -05:00
Rhea Parekh
3d4ee3b862
zerver/tests/test_email_mirror: Sweep force_str.
2017-12-26 09:09:31 -05:00