{% if (doc.communication_type && doc.communication_type == "Automated Message") { %}
{{ __("Notification sent to") }}
{% var recipients = (doc.recipients && doc.recipients.split(",")) || [] %}
{% var cc = (doc.cc && doc.cc.split(",")) || [] %}
{% var bcc = (doc.bcc && doc.bcc.split(",")) || [] %}
{% var emails = recipients.concat(cc, bcc) %}
{% var display_emails_len = Math.min(emails.length, 3) %}
{% for (var i=0, len=display_emails_len; i i+1) { %}
{{ "," }}
{% } %}
{% } %}
{% if (emails.length > display_emails_len) { %}
{{ "..." }}
{% } %}
{{ comment_when(doc.creation) }}
{% } else if (doc.comment_type && doc.comment_type == "Comment") { %}
{{ doc.user_full_name || frappe.user.full_name(doc.owner) }} {{ __("commented") }}
{{ comment_when(doc.creation) }}
{% } else { %}
{{ frappe.avatar(doc.owner, "avatar-medium") }}
{{ doc.user_full_name || frappe.user.full_name(doc.owner) }}
{{ comment_when(doc.creation) }}
{% } %}