open graph: Use uploaded realm icon for open graph images.

This commit is contained in:
Puneeth Chaganti
2019-04-26 18:32:16 +05:30
committed by Tim Abbott
parent 9e8cfbea3b
commit f3f172991b
3 changed files with 29 additions and 1 deletions

View File

@@ -133,6 +133,9 @@ def zulip_default_context(request: HttpRequest) -> Dict[str, Any]:
'allow_search_engine_indexing': allow_search_engine_indexing,
}
if realm is not None and realm.icon_source == realm.ICON_UPLOADED:
context['OPEN_GRAPH_IMAGE'] = '%s%s' % (realm_uri, realm_icon)
return context
def login_context(request: HttpRequest) -> Dict[str, Any]: