[In-App Chat Mobile] Set a message as read

Forge Component
(6)
Published on 2017-11-27 by Labs
6 votes
Published on 2017-11-27 by Labs

Hi all,

I have an issue: 

When I receive a message, the screen is refreshed. Then, I click the button Back, and get in again in the chat detail, but the message still unread.

It's possible set a message as read manually on click of the button Back?

Regards,

Renan Roos.

Solution

Hello Renan Roos.

The adopted strategy to remove the new message warning is when there is a reply, and the component does not provide a way to remove the warning apart from that scenario, at the moment.

To allow this, you can add an action that updates the LastSeenPost record for that SubjectId and your UserId.
A second version of the UpdateLastSeenPost action that instead of receiving the LastSeenPostId as a parameter has an aggregate to retrieve it.

Something like:

And call this action when the back button is clicked.

Hope this helps.

Cheers

Solution

Hello Rui, 

Thanks for the answer.

I'll continue with the pattern behavior for this component.

Cheers.

Rui Mendes wrote:

Hello Renan Roos.

The adopted strategy to remove the new message warning is when there is a reply, and the component does not provide a way to remove the warning apart from that scenario, at the moment.

To allow this, you can add an action that updates the LastSeenPost record for that SubjectId and your UserId.
A second version of the UpdateLastSeenPost action that instead of receiving the LastSeenPostId as a parameter has an aggregate to retrieve it.

Something like:

And call this action when the back button is clicked.

Hope this helps.

Cheers