Skip to content

Commit

Permalink
instagram create noop: use Source._content_for_create()
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Jan 31, 2017
1 parent 20d47c4 commit 5a99426
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions granary/instagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ def _create(self, obj, include_link=source.OMIT_LINK, preview=None,
abort=True,
error_plain='Cannot publish comments on Instagram',
error_html='<a href="http://instagram.com/developer/endpoints/comments/#post_media_comments">Cannot publish comments</a> on Instagram. The Instagram API technically supports creating comments, but <a href="http://stackoverflow.com/a/26889101/682648">anecdotal</a> <a href="http://stackoverflow.com/a/20229275/682648">evidence</a> suggests they are very selective about which applications they approve to do so.')
content = obj.get('content', '').encode('utf-8')
content = content if ignore_formatting else source.html_to_text(content)
content = self._content_for_create(obj).encode('utf-8')
if preview:
return source.creation_result(
content=content,
Expand Down

0 comments on commit 5a99426

Please sign in to comment.