<?php
/**
 * @var $messages_found
 * @var $interlocutor_id
 */

if ( $messages_found ) {
	foreach ( $messages_found as $message ) { ?>

		<div class="search-message-result-wrapper js-search-message-result-wrapper" data-id="<?php echo $message->id; ?>">

			<?php wpj_display_message_item( $message, get_current_user_id(), $interlocutor_id ); ?>

		</div>

	<?php }
}