Open the messagebox>inbox with only messages from a specified user


Home Forums Front End PM PRO Open the messagebox>inbox with only messages from a specified user

This topic is: Not Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21858
    Raeanna Lewarne
    Participant

    Shamin, per your request I pulled this question out of a different thread. My question was/is is it possible to open the messagebox>inbox with only messages from a specified user. We are trying to focus the messages specific to a particular post (project) but I don’t see any references to wp_posts in your data structures so I figured my best option is by user (maybe you have another suggestion)?

    I do have some PHP experience and it would be most desirable to not have to modify any of your source code, but we would to achieve desired functionality

    Thanks in advance.

    #21894
    shamim
    Keymaster

    Currently you can use fep_filter_message_query_sql hook to change sql and return your desire messages.
    We cannot pass multiple user id now to query. I have changed the query class so that we can pass multiple user id query. Next version you will get this. Then we will be able to easy achieve this.

    You can see this changes in https://github.com/shamim2883/front-end-pm/commit/5786895fc0d01c07694c711331201942d2300b15

    after this changes we can easily use hook like bellow

    add_filter( 'fep_message_query_args', function( $args, $user_id ) {
    	$args['participant_query'][] = array(
    		'mgs_participant' => 4, //which user messages you want to show with current user
    		'mgs_deleted'     => false,
    	);
    	return $args;
    }, 10, 2 );
    
Viewing 2 posts - 1 through 2 (of 2 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.