Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
OEmbed: provide author_url if author exists
  • Loading branch information
umbrae committed Jun 1, 2015
1 parent fa63e43 commit 390e6ea
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions r2/r2/controllers/oembed.py
Expand Up @@ -85,12 +85,17 @@ def _oembed_comment(thing, **embed_options):
title=websafe(title),
)

return dict(_OEMBED_BASE,
type="rich",
title=title,
author_name=author_name,
html=html,
)
oembed_response = dict(_OEMBED_BASE,
type="rich",
title=title,
author_name=author_name,
html=html,
)

if author_name:
oembed_response['author_url'] = make_url_https('/user/' + author_name)

return oembed_response


class OEmbedController(MinimalController):
Expand Down

0 comments on commit 390e6ea

Please sign in to comment.