Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/21/2010 07:02:03 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2068

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-messages.php

    r3111 r3140  
    420420    $message->date_sent = $date_sent;
    421421
    422     /* If we have a thread ID, use the existing recipients, otherwise use the recipients passed */
     422    // If we have a thread ID, use the existing recipients, otherwise use the recipients passed
    423423    if ( $thread_id ) {
    424424        $thread = new BP_Messages_Thread( $thread_id );
    425425        $message->recipients = $thread->get_recipients();
    426426
     427        // Strip the sender from the recipient list if they exist
     428        if ( $key = array_search( $sender_id, $message->recipients ) )
     429            unset( $message->recipients[$key] );
     430
    427431        if ( empty( $message->subject ) )
    428432            $message->subject = sprintf( __( 'Re: %s', 'buddypress' ), $thread->messages[0]->subject );
    429433
     434    // No thread ID, so make some adjustments
    430435    } else {
    431436        if ( empty( $recipients ) )
Note: See TracChangeset for help on using the changeset viewer.