pusher-community / pusher-realtime-chat-widget

Example Realtime Chat Widget that can be added to any web page or app.
97 stars 87 forks source link

change channel name does not work as expected. #19

Open silenceway opened 10 years ago

silenceway commented 10 years ago

Hi. Trying this code and works good, but if I try this: (add channel name)

        var chatWidget = new PusherChatWidget(pusher, {
          appendTo: "#pusher_chat_widget",
          channelName: "foo-bar-123-test-channel"
        });

textarea with messages always says No chat messages available Thanks for your help.

mestaritonttu commented 9 years ago

In chat.php, you have to match the name: $channel_name = "foo-bar-123-test-channel";

Comment out the useless $channel_name = get_channel_name($_SERVER['HTTP_REFERER']);

It took me like an hour of debugging to realize this..

I think this is a dupe of #11

samphors commented 8 years ago

It's worked for me. thanks you