Add realm-level settings to control inline image and url preview.

This gives users more control in case they don't want previews,
especially for the "previews of linked websites" feature.

Fixes: #2640.
This commit is contained in:
Ayush Jain
2017-03-13 19:12:03 +05:30
committed by Tim Abbott
parent a27f8f2f30
commit bddcfb1c96
17 changed files with 296 additions and 8 deletions

View File

@@ -206,6 +206,8 @@ def home_real(request):
server_generation = settings.SERVER_GENERATION,
use_websockets = settings.USE_WEBSOCKETS,
save_stacktraces = settings.SAVE_FRONTEND_STACKTRACES,
server_inline_image_preview = settings.INLINE_IMAGE_PREVIEW,
server_inline_url_embed_preview = settings.INLINE_URL_EMBED_PREVIEW,
# realm data.
# TODO: Move all of these data to register_ret and pull from there
@@ -299,6 +301,8 @@ def home_real(request):
'realm_icon_source',
'realm_icon_url',
'realm_invite_by_admins_only',
'realm_inline_image_preview',
'realm_inline_url_embed_preview',
'realm_invite_required',
'realm_message_content_edit_limit_seconds',
'realm_name',