Commit Graph

9602 Commits

Author SHA1 Message Date
Eeshan Garg c012362fde webhooks/librato: Use proper punctuation. 2019-04-23 14:32:21 -07:00
Eeshan Garg d733cc500c webhooks/groove: Rewrite the integration and improve messages.
The initial goal was to improve message formatting and punctuation
but after a closer look, I realized that a larger refactor was
worth it for clarity and redability.
2019-04-23 14:32:21 -07:00
Tim Abbott cb6c1e7a92 export: Fix log line about zerver_scheduledemail_users. 2019-04-23 13:52:02 -07:00
Anders Kaseorg 098e5ad3de templates: Fix more low-hanging HTML validation problems.
"http://localhost:9981/help/enable-emoticon-translations":323.13-324.31: error: The “align” attribute on the “th” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":324.45-325.31: error: The “align” attribute on the “th” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":329.13-330.23: error: The “align” attribute on the “td” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":330.44-331.23: error: The “align” attribute on the “td” element is obsolete. Use CSS instead.
"http://localhost:9981/help/enable-emoticon-translations":337.6-337.9: error: Stray end tag “p”.
"http://localhost:9981/help/enable-emoticon-translations":337.6-337.9: error: Cannot recover after last error. Any further errors will be ignored.
"http://localhost:9981/api/incoming-webhooks-walkthrough":381.4-381.77: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/apps/":192.21-192.34: error: Bad value “” for attribute “src” on element “img”: Must be non-empty.
"http://localhost:9981/apps/":192.21-192.34: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/features/":225.9-225.82: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
"http://localhost:9981/features/":230.72-232.8: error: Text not allowed in element “svg” in this context.
"http://localhost:9981/features/":259.9-259.91: error: An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 13:00:59 -07:00
Tim Abbott fa37401e69 api docs: Fix typo in typing notifications docs.
notification_to should be just to here.

This resulted from the person doing the port into these docs not
understanding the full REQ API.
2019-04-23 11:24:07 -07:00
Anders Kaseorg 61982d9d47 uploads: Revert "Url encoded name of the file should be an ascii."
This reverts commit fd9dd51d16 (#1815).

The issue described does not exist in Python 3, where urllib.parse now
_only_ accepts (Unicode) str and does the right thing with it.  The
workaround was not being triggered and would have failed if it were.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-22 22:28:39 -07:00
Vishwesh Jainkuniya c007b9ea4a notifcations: Remove `user` from the payload.
This contains email of the user to whom notification is being
send. This has not been used in any past mobile releases, so it is
safe to remove it.

As user_id will be stable for the user, but not email. So it's better to
start consuming `user_id` instead of email on mobile.
2019-04-22 14:50:04 -07:00
Vishwesh Jainkuniya 447a517e6f notifications: Add `user_id` in the GCM & APNS payload.
This makes it easy to uniquely identify the user account associated
with a notification by, for example, the (realm_uri, user_id) pair.

This helps improve notifications in the mobile apps.
See https://github.com/zulip/zulip-mobile/pull/3407#discussion_r266196616

Fixes #11961.
2019-04-22 14:49:03 -07:00
Puneeth Chaganti 184c0b9870 render_markdown_path: Convert dicts to dict item tuples for caching.
Calls to `render_markdown_path` weren't getting cached since the context
argument is unhashable, and the `ignore_unhashable_lru_cache` decorator ignores
such calls. This commit adds a couple of more decorators - one which converts
dict arguments to the function to a dict items tuple, and another which converts
dict items tuple arguments back to dicts. These two decorators used along with
the `ignore_unhashable_lru_cache` decorator ensure that the calls to
`render_markdown_path` with the context dict argument are also cached.

The time to run zerver.tests.test_urls.PublicURLTest.test_public_urls drops by
about 50% from 8.4s to 4.1s with this commit. The time to run
zerver.tests.test_docs.DocPageTest.test_doc_endpoints drops by about 20% from
3.2s to 2.5s.
2019-04-22 13:53:18 -07:00
Eeshan Garg d8d9695087 webhooks/newrelic: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg f86e445fe6 webhooks/sentry: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 424061a07a webhooks/papertrail: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 1c1b440adf webhooks/pingdom: Improve message formatter and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg b44d352af6 webhooks/pagerduty: Use colons before quote blocks. 2019-04-17 16:22:43 -07:00
Eeshan Garg e682889437 webhooks/insping: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 5fccf197d1 webhooks/greenhouse: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 674fcfcce1 webhooks/semaphore: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 9d79becc0e webhooks/splunk: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 21cdb6decc webhooks/wordpress: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Eeshan Garg 0a0df3bc58 webhooks/zabbix: Improve message formatting and punctuation. 2019-04-17 16:22:43 -07:00
Shubham Padia 7743fa5297 auth: Redirect deactivated user to /login when attempting social login. (#12130) 2019-04-17 12:28:57 -07:00
Shubham Padia 31cedbc9b8 backup: Make `--output` an optional argument instead of a positional one.
Fixes #12150.
Previously the `output` argument was positional, while the docs described
the arguments as optional in the form of `--output=...`.
2019-04-17 12:14:11 -07:00
Shubham Padia 32cf192b9b backup: Add option `--skip-uploads` to skip uploads backup. 2019-04-17 12:14:11 -07:00
Shubham Padia 984d3f2f0e backup: Add option `--skip-db` to skip database backup.
This may be relevant for organizations that use a corporate remote
postgres server and just want to backup their configuration.
2019-04-17 12:14:11 -07:00
neiljp (Neil Pilgrim) 1348c8fd05 requirements: Upgrade mypy to 0.670.
Requires minor adjustment for accented 'i' in variable name.
2019-04-16 17:50:12 -07:00
Rishi Gupta 1e5df34a4c help: Make minor updates to import-from-mattermost. 2019-04-16 17:49:42 -07:00
Eeshan Garg f7fd9bd17d webhooks/statuspage: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg f6a601f09f webhooks/heroku: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg 8cf18fe4d2 webhooks/delighted: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg 33b0bf3cb4 webhooks/beeminder: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg b7ea727087 webhooks/basecamp: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg e7fee92463 webhooks/appveyor: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Eeshan Garg 92509a0cac webhooks/ansibletower: Improve message formatting and punctuation. 2019-04-14 22:20:02 -07:00
Vishnu Ks 877d2bb68f docs: Add docs for exporting from gitlab omnibus mattermost. 2019-04-13 20:27:12 -07:00
Vishnu Ks 7718c00a36 docs: Add docs for exporting from non docker mattermost. 2019-04-13 20:27:12 -07:00
Puneeth Chaganti ca8e9fb800 bugdown: Make the youtube URL regex slightly easier to read. 2019-04-13 20:25:37 -07:00
Puneeth Chaganti 8afda1c1bb bugdown: Show preview for urls copied from the Youtube share widget. 2019-04-13 20:25:37 -07:00
Shubham Padia 3c09f226a4 auth: Redirect deactivated users with error for social auth backend.
Fixes #11937.

Also extracts the error message for a deactivated account to
`DEACTIVATED_ACCOUNT_ERROR`.
2019-04-13 19:58:15 -07:00
overide b263671c9e markdown: Fix unordered list not rendering in blockquote.
This fixes an issue where the hanging unordered list was not
rendering in blockquote; the problem was that we were not
adding an empty line(to satisfy the markdown) for hanging
unordered list if it is in blockquote. Both blockquote
and code block is fenced but we want to avoid rendering
the list if it's in the code block but not in blockquote.

Fixes: #11916.
2019-04-13 19:23:59 -07:00
Anders Kaseorg d03b8308a5 backup: Use tar --transform to arrange the tarball instead of symlinks.
This allows tar to print the real paths in error messages if something
goes wrong.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-04-12 16:48:34 -07:00
Wyatt Hoodes bafcf3c664 export.py: Add 'delete after upload' option for removing tarball.
This allows removal of the local tarball upon a succesful s3 upload.

A part of the public-only-realm-export webapp feature.
2019-04-12 10:50:06 -07:00
Wyatt Hoodes 0db7d6c31b export.py: Refactor './manage.py export' core logic.
This commit serves as the first step in supporting "public export" as a
webapp feature.  The refactoring was done as a means to allow calling
the export logic from elsewhere in the codebase.
2019-04-12 10:50:06 -07:00
Tim Abbott ddf26a6ced test_events: Post-process state before comparisons in do_test.
This is important because upcoming features will include slightly more
complex logic in post_process_state that we'd ideally like to be
included in what this suite tests.

This requires a few related changes:

* A small change to post_process_state to sort the realm_users objects
  by user_id to ensure those data structures are stable.

* Improvements to the logic for checking if the initial state has
  changed to use match_states for better output.
2019-04-08 19:42:34 -07:00
Vishnu Ks 02c92e55a2 import: Add tool for importing teams from mattermost. 2019-04-05 17:53:03 -07:00
clarammdantas 85ddd73d8c message_edits: Notify subscribers when a message is changed.
Extend the list of users that have to be notified when a message is
changed, so that in addition to users who have a UserMessage row, any
users who subscribed later to a stream with history public to
subscribers will also get the update.

Fixes: #8750.
2019-04-05 17:06:24 -07:00
Eeshan Garg bc430909af webhooks/intercom: Implement support for all events. 2019-04-05 15:15:52 -07:00
Tim Abbott 4c3c669b41 mobile: Add support for recent_private_conversations API.
This adds experimental support in /register for sending key
statistical data on the last 1000 private messages that the user is a
participant in.  Because it's experimental, we require developers to
request it explicitly in production (we don't use these data yet in
the webapp, and it likely carries some perf cost).

We expect this to be extremely helpful in initializing the mobile app
user experience for showing recent private message conversations.

See the code comments, but this has been heavily optimized to be very
efficient and do all the filtering work at the database layer so that
we minimize network transit with the database.

Fixes #11944.
2019-04-04 16:47:43 -07:00
Eeshan Garg 0076b71411 webhooks/stripe: Ignore account updates with insufficient data.
Certain payloads for account updates do not include the
previous_attributes that allow us to figure out what was actually
updated. So, we just ignore just payloads.
2019-04-04 15:21:47 -07:00
Vishnu Ks d64f5e9ccd test_classes: Move make_output_dir to test_classes. 2019-04-04 13:51:52 -07:00
Vishnu Ks 719abbd352 test_classes: Move rm_tree to test_classes. 2019-04-04 13:51:52 -07:00