mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	Add oembed/Open Graph/Meta tags data retrieval from inline links.
This change adds support for displaying inline open graph previews for links posted into Zulip. It is designed to interact correctly with message editing. This adds the new settings.INLINE_URL_EMBED_PREVIEW setting to control whether this feature is enabled. By default, this setting is currently disabled, so that we can burn it in for a bit before it impacts users more broadly. Eventually, we may want to make this manageable via a (set of?) per-realm settings. E.g. I can imagine a realm wanting to be able to enable/disable it for certain URLs.
This commit is contained in:
		@@ -291,6 +291,7 @@ def render_markdown(message, content, domain=None, realm_alert_words=None, messa
 | 
			
		||||
    message.is_me_message = False
 | 
			
		||||
    message.mentions_user_ids = set()
 | 
			
		||||
    message.alert_words = set()
 | 
			
		||||
    message.links_for_preview = set()
 | 
			
		||||
 | 
			
		||||
    if not domain:
 | 
			
		||||
        domain = message.sender.realm.domain
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user