talk icon indicating copy to clipboard operation
talk copied to clipboard

get only messages which are not softdeleted

Open haheute opened this issue 7 years ago • 1 comments

Hello. How can I get only the messages which are not deleted_from_sender ? I show a conversation to a specific user and when I softdelete a message, it is still shown after it has been marked as deleted_from_sender.

It is good that a user can softdelete his/her copy of a message. But then I still see it.

    $messages = null;
    $conversations = Talk::getConversationsByUserId($user->id, 0, 20);
    if($conversations){
        $messages = $conversations->messages->reverse();
    }

The ->messages does not seem to check if the messages are softdeleted:

select * from `messages` where `messages`.`conversation_id` = '2' and `messages`.`conversation_id` is not null

Maybe I just don't see right the method/function.. Thanks for help.

haheute avatar Dec 27 '16 15:12 haheute

please share your messages table and delation code.

nahid avatar Dec 28 '16 06:12 nahid

This issue is very old. I totally forgot it. Sorry. Closing because I'm not longer using Laravel and Talk.

haheute avatar Dec 20 '22 12:12 haheute