Skip to:
Content

#7527 closed feature request (wontfix)

add an action "bp_messages_thread_created"

Reported by: 7asobate Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Messages Keywords:
Cc:

Description

add the action "bp_messages_thread_created" to the "bp_messages_action_create_message" function in buddypress/bp-messages/bp-messages-actions.php on line 101

                        // Attempt to send the message.
                        $send = messages_new_message( array(
                                'recipients' => $recipients,
                                'subject'    => $_POST['subject'],
                                'content'    => $_POST['content'],
                                'error_type' => 'wp_error'
                        ) );

                        // Send the message and redirect to it.
                        if ( true === is_int( $send ) ) {
                                $success     = true;
                                $feedback    = __( 'Message successfully sent.', 'buddypress' );
                                $view        = trailingslashit( $member_messages . 'view' );
                                $redirect_to = trailingslashit( $view . $send );
                                do_action('bp_messages_thread_created', $send);
                        // Message could not be sent.
                        } else {
                                $success  = false;
                                $feedback = $send->get_error_message();
                        }
                }
        }


Change History (1)

#1 @r-a-y
13 months ago

  • Component changed from Core to Messages
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

You should be able to use the 'messages_message_sent' hook for this:
https://buddypress.trac.wordpress.org/browser/tags/2.8.2/src/bp-messages/bp-messages-functions.php#L192

Closing this one.

Note: See TracTickets for help on using tickets.