Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Grouping Private Messages View modes: 
User avatar
Member
Member
gatsby0121 - 11/17/2011 3:32:24 AM
   
Grouping Private Messages
I'm currently writing a custom webpart(s) that allows a user to converse back and forth with a staff memeber. I'm able to display all messages for that user using the api, but is there a way so that I can show only the first message from topics?

For instance let's say a user had a conversation with a staff member about computers. Then the computer had another back and forth conversation about tv's.

How can I show a page that only has the first message of each conversation (actually just the title will show) and when the user clicks on that title, it opens up a page with all of the messages from that conversation only? i.e. only the computer conversation should show, or only the TV conversation, but not both.

Is there a conversation id?

User avatar
Member
Member
kentico_michal - 11/21/2011 4:22:03 AM
   
RE:Grouping Private Messages
Hello,

If you use a default messaging module, then messages are stored independently, meaning that there is no conversation ID that would indicate that they belong to one conversation. You can take a look at this table Messaging_Message to see what fields are available.

Best regards,
Michal Legen

User avatar
Member
Member
gatsby0121 - 11/22/2011 5:18:03 AM
   
RE:Grouping Private Messages
Is there anyway to get the messageid of the saved message? That way I could create a separate tracking table and track the messages myself

User avatar
Member
Member
kentico_michal - 11/24/2011 7:01:36 AM
   
RE:Grouping Private Messages
Hello,

You can get the MessageID from the MessageInfo.MessageID property. If you want to see API related to saving messages, please take a look at the following method: btnSendMessage_Click (~\CMSModules\Messaging\Controls\SendMessage.ascx.cs) that gets invoked when you create a new message in the My messages web part.


Best regards,
Michal Legen