-
-
- {% for conversation in replies %}
-
- {% set args = { 'type': 'vanilla_full', 'note': conversation['note'], 'replies': conversation['replies'] | default, 'extra': extra } %}
- {{ NoteFactory.constructor(args) }}
- {% endfor %}
-
-
- {% endif %}
-{% endblock note_replies %}
-
{% block note_attachments %}
{% if hide_attachments is not defined %}
{% if note.getAttachments() is not empty %}
diff --git a/templates/cards/macros/note/types.html.twig b/templates/cards/macros/note/types.html.twig
index 196a46f779..918518f974 100644
--- a/templates/cards/macros/note/types.html.twig
+++ b/templates/cards/macros/note/types.html.twig
@@ -1,9 +1,6 @@
-
{# args: { 'type': { 'vanilla_full' }, 'note': note, ?'replies': { note, ?replies }, ?'extra': { 'foo': bar } #}
{% macro vanilla_full(args) %}
- {% set note = args.note %}
- {% if args.replies is defined %}{% set replies = args.replies %}{% else %}{% set replies = null %}{% endif %}
- {% if args.extra is defined %}{% set extra = args.extra %}{% else %}{% set extra = null %}{% endif %}
+ {% set note = args.conversation.note %}
{% set actor = note.getActor() %}
{% set nickname = actor.getNickname() %}
@@ -54,9 +51,10 @@
{{ block('note_complementary', 'cards/blocks/note.html.twig') }}
- {% if replies is defined %}
- {{ block('note_replies', 'cards/blocks/note.html.twig') }}
- {% endif %}
+ {% set additional_blocks = handle_event('AppendNoteBlock', app.request, args.conversation) %}
+ {% for block in additional_blocks %}
+ {{ block | raw }}
+ {% endfor %}
{% endmacro vanilla_full %}