talk
talk copied to clipboard
get only messages which are not softdeleted
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.
please share your messages table and delation code.
This issue is very old. I totally forgot it. Sorry. Closing because I'm not longer using Laravel and Talk.