So in trying to fix the other issue with the Inbox showing all messages (duplicates of the same conversation when replied to), I tried something which partially addressed it but caused another issue.
Yuri, what do you think?
For the Inbox to not show duplicates of replies and only show one copy of the subject that can be clicked on to see the entire thread, I had to go into mod.messaging.php and in line 1704 I added:
$this->EE->db->where('exp_message_copies.message_status !=', 'replied');
But now, unless the member I have replied to also replies back, their messages doesn’t show up in the Inbox anymore.
I ran your query, based off of mod.messaging.php in the DB Query in the CP:
SELECT exp_message_copies.message_status, exp_message_copies.message_id, exp_message_copies.message_received, exp_message_copies.message_read, exp_message_copies.copy_id, exp_message_copies.recipient_id, exp_message_data.sender_id, exp_message_data.message_date, exp_message_data.message_subject, exp_message_data.message_body, exp_message_data.message_recipients, exp_message_data.message_cc, exp_message_data.message_attachments, exp_members.screen_name, exp_members.username, exp_members.email, exp_members.avatar_filename, exp_members.photo_filename FROM exp_message_copies LEFT JOIN exp_message_data ON exp_message_copies.message_id = exp_message_data.message_id LEFT JOIN exp_members ON exp_members.member_id = exp_message_copies.sender_id WHERE exp_message_copies.recipient_id = 3 AND exp_message_copies.message_folder = 1 AND exp_message_copies.message_deleted = 'n' AND exp_message_data.message_status = 'sent'
And this produced the initial issue I was talking about, which shows multiple results for the same private message thread in the Inbox even if they are the same conversation but just replies.
Thoughts?
|