Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get only messages which are not softdeleted #37

Closed
haheute opened this issue Dec 27, 2016 · 2 comments
Closed

get only messages which are not softdeleted #37

haheute opened this issue Dec 27, 2016 · 2 comments

Comments

@haheute
Copy link

haheute commented Dec 27, 2016

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.

@nahid
Copy link
Owner

nahid commented Dec 28, 2016

please share your messages table and delation code.

@haheute
Copy link
Author

haheute commented Dec 20, 2022

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

@haheute haheute closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants