{%- macro notification_link(notification) -%}
  {{ request.app_url }}/r/{{ notification.node_event.node.id }}
{%- endmacro -%}

{%- macro human_action(notification) -%}
  {%- if notification.node_event.node.verified %}{{ notification.node_event.user.name }} {% else %}an unverified user {% endif %}
  {%- if notification.node_event.action == "created" -%}
  created a new thread:
    {{ notification_link(notification) }}
  {%- elif notification.node_event.action == "commented" -%}
  left a comment:
    {{ notification_link(notification) }}
  {%- endif -%}
{%- endmacro -%}

{%- macro email_footer(notification=None) -%}

{%- if notification %}
We sent this notification because you {% if notification.watcher.type in ['node', 'namespace'] %}watch this {% if notification.watcher.type == 'node' %}thread{% else %}Namespace{% endif %}{%- else %}subscribe to reply notifications{% endif %}.
{%- else %}
We sent this message because you currently subscribe to Email notifications.
{%- endif %}

To adjust your notification settings, go to:

 * {{ request.app_url }}/u/watching
{%- endmacro -%}
