Maintain Messages in Database after user deletion


Home Forums Front End PM PRO Maintain Messages in Database after user deletion

This topic is: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41703
    David
    Participant

    Hi Shamim,

    At the moment, if a user deletes a message they do not have permission to view the message again even if it is still on the database (i.e. if the same message has not been deleted by the other participant.). Also, when both users delete the same message it is removed completely from the database.

    I have a requirement for the message participants to still be able to view the message and reply after they have deleted it from their messagebox. They would access the message by the permalink which would be stored on another post.
    In addition I would like it so that even if both users delete the message, the message remains in the database and can still be viewed by both as above.

    Is this possible?

    #41708
    Shamim Hasan
    Keymaster

    So as i understand delete do not do anything in your use case. You can remove delete option so that nobody can delete a message.
    Please add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_message_table_bulk_actions', function( $actions ){
    	unset( $actions['delete'] );
    	return $actions;
    });
    

    Let me know if this helps.

    #41714
    David
    Participant

    Thanks for the quick reply.

    Not quite…

    Here is the flow:

    1. User a and user b communicate with messages.

    2. A booking is completed. The booking confirmation contains the link to the parent message which now has fep meta ‘booking_confirmed’.

    3. User a and user b can delete the message thread from the message box.

    4. After message deletion, for either user, the message can be accessed from the booking confirmation. They have permission to view the message and can send further messages in the same thread.

    Essentially, when a message is deleted by either user with meta ‘booking_confirmed’ it only means that they cannot see the message in the message box. Everything else is the same. It is more like “hide” message.

    #41717
    Shamim Hasan
    Keymaster

    It will be possible but needs some custom code. If you need it badly you can contact through https://www.shamimsplugins.com/hire/

    #41725
    David
    Participant

    Thanks, I have sent you a message through the contact form.

Viewing 5 posts - 1 through 5 (of 5 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.