There are flaws in this demo which makes it impossible to pull into an existing application.
When you start a conversation with Chat::startAConversation($userId) by default, there are no messages.
So when you run $conversation = Chat::getAllConversations
It returns an instance with null messages and without the conversation ID for each conversation. The conversation ID is reference only by doing $conversation->message->conversationId so how can you get the conversationID when the message is null?.
How does one send the first message using the conversationID which is only available when the message is not null.
If the messages table is empty, the app would not work properly
Agree with @felix2056 . I suggest that List all the User then there is a button to call or have conversation
then in group is suggest the same and put a video confe button
There are flaws in this demo which makes it impossible to pull into an existing application. When you start a conversation with
Chat::startAConversation($userId)
by default, there are no messages. So when you run$conversation = Chat::getAllConversations
It returns an instance with null messages and without the conversation ID for each conversation. The conversation ID is reference only by doing$conversation->message->conversationId
so how can you get the conversationID when the message is null?.How does one send the first message using the conversationID which is only available when the message is not null.
If the messages table is empty, the app would not work properly