nahid / talk

Talk is a real-time users messaging and chatting system for Laravel.
MIT License
1.61k stars 327 forks source link

Talk::getInbox(); #25

Closed SpikeLV closed 7 years ago

SpikeLV commented 7 years ago

I try to use this function, but it returns only conversations where I'm a sender. Is it right?

To get all conversation ( where I'm is as sender and where I'm is a replyer) which function do I need to use?

nahid commented 7 years ago

As a authenticated user sender and replyer is a same thing. So when you send a message its act as a sender or replyer

SpikeLV commented 7 years ago

I understand that, but by some reason I'm getting only where I'm sender

nahid commented 7 years ago

Please give me an example...

SpikeLV commented 7 years ago

Sent by mail

samposin commented 7 years ago

When i call Talk::getInbox() function after Talk::setAuthUserId(auth()->user()->id);

  1. I am only getting one record.
  2. One of the two login user, receiver id and sender id is same and also message is wrong issue or http://shareimage.posintechnologies.com/25_11_16_20_00_41.png

am i doing something wrong?

nahid commented 7 years ago

Yes you do something wrong, inbox mean messages thread. when you call getInbox, it return you all message tread where you involve. If you want to get all message with your desire user, you have to call getConversationsById($conversationId) or getConversationsByUserId($userId).

@samposin

samposin commented 7 years ago

ok got it, thanks @nahid