diff --git a/components/Conversation/Conversation.php b/components/Conversation/Conversation.php index 3a0c536c12..616c9db945 100644 --- a/components/Conversation/Conversation.php +++ b/components/Conversation/Conversation.php @@ -83,14 +83,12 @@ class Conversation extends Component } else { // It's a reply for sure // Set reply_to property in newly created Note to parent's id - $current_note->setReplyTo($parent_id); - // Parent will have a conversation of its own, the reply should have the same one $parent_note = Note::getById($parent_id); $current_note->setConversationId($parent_note->getConversationId()); } - DB::merge($current_note); + DB::persist($current_note); } /** diff --git a/components/Group/templates/group/view.html.twig b/components/Group/templates/group/view.html.twig index 7bd30b2db8..a2e7cf91b3 100644 --- a/components/Group/templates/group/view.html.twig +++ b/components/Group/templates/group/view.html.twig @@ -1,61 +1,16 @@ -{% extends 'stdgrid.html.twig' %} -{% import '/cards/macros/note.html.twig' as noteView %} +{% extends 'collection/notes.html.twig' %} {% set nickname = nickname|escape %} {% block title %}{{ nickname }}{% endblock %} -{% block stylesheets %} - {{ parent() }} - -{% endblock stylesheets %} - {% block body %} - {% if actor is defined and actor is not null %} {% block profile_view %} {% include 'cards/blocks/profile.html.twig' with { 'actor': actor } only %} {% endblock profile_view %} {% if notes is defined %} -
-
-

{{ 'Notes' | trans }}

- -
- - {% if notes is not empty %} - {# Backwards compatibility with hAtom 0.1 #} -
- {% for conversation in notes %} - {% block current_note %} - {% if conversation is instanceof('array') %} - {{ noteView.note_vanilla(conversation['note'], conversation['replies']) }} - {% else %} - {{ noteView.note_vanilla(conversation) }} - {% endif %} -
- {% endblock current_note %} - {% endfor %} -
- {% else %} -
- {% trans %}No notes yet...{% endtrans %} -
- {% endif %} -
+ {{ parent() }} {% endif %} {% endif %} {% endblock body %}