PHPJunior / laravel-video-chat-demo

Laravel Video Chat using Socket.IO and WebRTC ( Demo )
85 stars 58 forks source link

This app is not properly structured #13

Open felix2056 opened 4 years ago

felix2056 commented 4 years ago

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

sccake53194 commented 3 years ago

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