def send_content_retraction(content, author_id):
"""Handle sending of retractions.
Currently only for public content.
"""
if not content.visibility == Visibility.PUBLIC or not content.local:
return
author = Profile.objects.get(id=author_id)
entity = make_federable_retraction(content, author)
if entity:
if settings.DEBUG:
# Don't send in development mode
return
recipients = [
(settings.SOCIALHOME_RELAY_DOMAIN, "diaspora"),
]
recipients.extend(_get_remote_followers(author))
handle_send(entity, author, recipients)
else:
logger.warning("send_content_retraction - No retraction entity for %s", content)
评论列表
文章目录