private function from_notes(array $messages, $simple = true){
    if ( !empty($messages) ){
      foreach ( $messages as $idx => $mess ){
        if ( empty($mess['id_note']) ){
          unset($messages[$idx]);
          continue;
        }
        $note = $this->notes->get($mess['id_note']);
        $note = [
          'id' => $mess['id'],
          'title' => $note['title'],
          'content' => $note['content']
        ];
        if ( $simple ){
          $messages[$idx] = $note;
        }
        else {
          $messages[$idx] = \bbn\x::merge_arrays($messages[$idx], $note);
        }
      }
    }
    return $messages;
  }