I can't seem to figure out how to show only the author who last sent a message within a thread. (inbox view, not within the actual thread page.)

I know you can limit the number of participant names to be shown in the users inbox like so... _privatemsg_format_participants($participants, 1, TRUE) But how can I order this so that the first participant is always the user who last sent a message within a thread.

Comments

walker2238’s picture

Anyone know how to do this?

berdir’s picture

This is currently not possible, because the participant list can't be sorted, atleast not with MySQL. We need to change how we load those first...

walker2238’s picture

Should I change this to a feature request? I'm pretty bad with databases. My initial thought was to some how sort the message participants by thread id, the same as in the message view.

The main reason for this is because if your only displaying one participant, it comes off as a bit redundant when viewing sent messages.

litwol’s picture

You may need to create a whole new query to figure out who was the last sender on a thread when rendering the inbox. Im not 100% sure about it, i've not looked at code yet.

berdir’s picture

Currently, we use GROUP_CONCAT() on Mysql to load a list of user ID's. And that simply does not support sorting.

I want to change that to a single but separate query, pretty much the same as I am already doing for #523064: Display tags in thread list. So, you can help by testing and reviewing that patch, so that it does get commited and we can confirm that it works correctly in all cases.

berdir’s picture

Version: 6.x-1.x-dev »
Category: support » feature

Setting the correct category, this is a new feature, not a support request.

berdir’s picture

Status: Active » Closed (duplicate)