Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hook for Private Message Reply

  • @fencer04

    Participant

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @henrywright

    Moderator

    Try checking if thread_id exists. If not then it’s the first message of a new thread.

    @fencer04

    Participant

    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?

    @danbp

    Participant

    Here the complete list of functions containing threat_id in their name:
    http://hookr.io/plugins/buddypress/#index=g&search=thread_id

    @fencer04

    Participant

    Thank you @danbp this was really helpful and set me on the right path.

    @abhishekshrm2001

    Participant

    Can you send me the code i need similar functionality where I need to hide send-reply button for some group messages

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar