ammezie / laravel-chat

Build a chat app in Laravel
MIT License
123 stars 126 forks source link

Realtime not working #2

Closed imbhavin95 closed 7 years ago

imbhavin95 commented 7 years ago

After message send destination side have to refresh tab not auto load chat like proper chat functionality. how to set auto refresh chat body.

ammezie commented 7 years ago

I don't understand what you mean.

imbhavin95 commented 7 years ago

it means Real time chatting is not working. it means if user1 send message to user2 so user2 have to refresh page to view message of user1.

ammezie commented 7 years ago

It is working as expected (with real-time chatting) over here. Probably something is wrong from your side.

imbhavin95 commented 7 years ago

Which thing you expect is wrong?

ammezie commented 7 years ago

Probably your Pusher credentials. Open dev tools to see if there are any kind of errors.

devvrat-sharma commented 7 years ago

Real time chatting not working. To see the mesages i have to refresh the page everytime.

NicholasDShaw commented 7 years ago

This happened to me too, it was because the pusher cluster was staticly set to 'eu' in public/js/app.js

You will get errors in the javascript console when the cluster isn't set to the correct value.

After changing that to the correct cluster it works.

@ammezie I recommend creating an environment variable in .env.example for the cluster to have that set dynamically in public/js/app.js and config/broadcasting.php

ammezie commented 7 years ago

Thanks for pointing that out. As at the time of creating the app, Pusher cluster is not required to be explicitly set. I will update the code and readme as well.

ammezie commented 7 years ago

I have updated the code and the readme, hence I'm closing this.

Legend23 commented 6 years ago

I have to refresh the page to see the difference. So i went to the console log and see this.

I don't understand the problem.

pusher