6 years, 6 months ago
So I’m using the ‘messages_message_before_save’ action to block a user from sending private messages to certain members. This function isn’t being called if the sender has already started a conversation with the user that is blocking them.
Is there another hook that should be used?
Try checking if thread_id exists. If not then it’s the first message of a new thread.
I’m confused by your response. How can I check if a thread ID exists when the function I’m using isn’t getting called because I don’t have the proper action hook?
Here the complete list of functions containing threat_id in their name:
Thank you @danbp this was really helpful and set me on the right path.
10 months ago
Can you send me the code i need similar functionality where I need to hide send-reply button for some group messages
See also: WordPress.org •
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service