You can with BP Legacy, there’s a filer bp_message_thread_to
which provides an array of all the sent to id’s, you can loop through these and unset it where it is the same as the current user id.
Not sure if that would work for BP Nouveau.
Oke, thanks.
Could you tell me, what I need to change here than?
<td class=”thread-from”>
<?php bp_message_thread_avatar( array( ‘width’ => 25, ‘height’ => 25 ) ); ?>
<span class=”to”><?php _e( ‘To:’, ‘buddypress’ ); ?></span> <?php bp_message_thread_to(); ?>
<span class=”activity”><?php bp_message_thread_last_post_date(); ?></span>
</td>
You can add this to your functions.php:
function bpex_revise_message_to( $recipients ) {
$href = bp_core_get_user_domain( get_current_user_id() );
$explode = explode( ', ', $recipients );
foreach ( $explode as $index => $to_link ) {
if ( strpos( $to_link, $href ) !== false ) {
unset($explode[$index]);
}
}
$recipients = implode( ', ', $explode );
return $recipients;
}
add_filter('bp_message_thread_to', 'bpex_revise_message_to' );
This does not work with BP Nouveau though.