(sender, instance, created, **kwargs)
return
Send message to users when they receive an award.
Send message to users when they receive an award.
Send message to users when they receive an award .
def send_herald_message(sender, instance, created, **kwargs):
    """
    Send message to users when they receive an award.
    """
    if created:
        template = "messages/shared_link.md"
        context = dict(shared=instance)

        # Let the user know we have received.
        tasks.create_messages(template=template, extra_context=context, user_ids=[instance.author.pk])
        logmsg = f"{instance.get_status_display().lower()} herald story {instance.url[:100]}"
        auth.db_logger(user=instance.author, text=logmsg)

    return
def send_herald_message ( sender , instance , created , * * kwargs ) : if created : template = "messages/shared_link.md" context = dict ( shared = instance ) # Let the user know we have received. tasks . create_messages ( template = template , extra_context = context , user_ids = [ instance . author . pk ] ) logmsg = f"{instance.get_status_display().lower()} herald story {instance.url[:100]}" auth . db_logger ( user = instance . author , text = logmsg ) return