zulip/zerver
Hariom Verma 107da5402c url preview: Replace YouTube URLs with their titles.
Modified by punchagan to:
* Replace URLs with titles only if the inline url embed previews are turned on
* Add a test for youtube titles replacing URLs

The titles for the videos are fetched asynchronously after the message has been
sent via the code that fetches metadata for open graph previews. So, the URLs
are replaced with titles only if the inline embed url previews feature is
enabled.

Ideally, YouTube previews should be shown only if inline url previews are
enabled, but this feature is in beta, while YouTube previews are pretty stable.
Once this feature is out of beta, YouTube previews should be shown only if the
url previews feature is turned on.

YouTube preview image is calculated as soon as the message is sent, while the
title needs to be fetched using a network request. This means that the URL is
replaced only after the data has been fetched from the request, and happens a
couple of seconds after the message has been rendered.

Closes #7549
2019-07-12 19:14:19 -07:00
..
data_import slack_import: Support importing multiparty IMs. 2019-07-09 15:03:28 -07:00
lib url preview: Replace YouTube URLs with their titles. 2019-07-12 19:14:19 -07:00
management management: Fix obsolete check for double-adding a permission. 2019-07-08 13:44:40 -07:00
migrations models: Add `external_account` in custom profile field types. 2019-07-09 17:21:54 -07:00
openapi openapi: Standardize URL format to use {var_name} syntax. 2019-07-11 11:01:40 -07:00
templatetags webhooks/freshdesk/doc.md: Remove unescape_rendered_html kludge. 2019-07-03 15:05:45 -07:00
tests url preview: Replace YouTube URLs with their titles. 2019-07-12 19:14:19 -07:00
tornado tornado: Remove unused imports. 2019-02-02 17:33:13 -08:00
views notification bot: Update stream announcement message. 2019-07-11 15:22:36 -07:00
webhooks webhooks: Migrate reviewboard tests to the headers fixtures system. 2019-07-09 17:13:02 -07:00
worker public_export: Add support for deleting export after access. 2019-05-31 22:54:27 -07:00
__init__.py
apps.py python: Mark intentionally unused imports with noop statements. 2019-02-22 16:54:47 -08:00
context_processors.py open graph: Uploaded realm icon URL is absolute for some backends. 2019-05-20 13:14:28 -07:00
decorator.py decorator: Refactor @require_non_guest_human_user decorator. 2019-06-18 17:11:58 -07:00
filters.py filters: Don't include realm_counts/installation_counts in errors. 2019-04-30 14:10:59 -07:00
forms.py ktlo: Contact org admin instead of server admin for wrong subdomain error. (#12543) 2019-06-26 14:09:20 -07:00
logging_handlers.py try_git_describe: Set cwd, not --git-dir. 2019-02-28 14:59:33 -08:00
middleware.py rate_limiter: Create a general rate_limit_request_by_entity function. 2019-05-30 16:50:11 -07:00
models.py models: Add `external_account` in custom profile field types. 2019-07-09 17:21:54 -07:00
signals.py zerver core: Remove unused imports. 2019-02-02 17:41:24 -08:00