{% macro avatar(jid) %} {%- if identities is defined -%} {%- if identities[jid].avatar_basename is defined %} {% else %} {{author|first|upper}} {%- endif -%} {%- endif -%} {% endmacro %}