Skip to:
Content

BuddyPress.org

Ticket #5254: 5254.diff

File 5254.diff, 711 bytes (added by imath, 10 years ago)
  • bp-messages/bp-messages-classes.php

     
    248248                if ( empty( $user_id ) )
    249249                        $user_id = bp_loggedin_user_id();
    250250
    251                 return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->messages->table_name_recipients} WHERE thread_id = %d AND user_id = %d", $thread_id, $user_id ) );
     251                return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->messages->table_name_recipients} WHERE thread_id = %d AND is_deleted = 0 AND user_id = %d", $thread_id, $user_id ) );
    252252        }
    253253
    254254        public static function is_valid( $thread_id ) {