Git Product home page Git Product logo

Comments (9)

JBlaak avatar JBlaak commented on June 9, 2024 1

For me a dive into how listen differs from on provided the solution, it will first pass the event through the event formatter, which will add a namespace. https://github.com/laravel/echo/blob/master/src/channel/pusher-channel.ts#L89

from echo.

driesvints avatar driesvints commented on June 9, 2024 1

Closing this issue because it's already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue.

from echo.

JBlaak avatar JBlaak commented on June 9, 2024

I can reproduce this, tried the pusher-js library on 4.0.0 and 3.2.4 to make sure it wasn't a dependency problem.

from echo.

Kreshnik avatar Kreshnik commented on June 9, 2024

Thanks @JBlaak your answer helps. Nevertheless, it is still not working, I am using private channels, so far I can see no mistake code wise.

from echo.

morloderex avatar morloderex commented on June 9, 2024

Are you sure you are on the correct cluster? :) in both laravel-echo and your laravel application.

from echo.

Kreshnik avatar Kreshnik commented on June 9, 2024

@morloderex yes, I have set for both the 'eu' cluster. To provide a little more information, I listening from within vuejs mounted event after the $nextTick event. See source code below;

mounted() {
            this.$nextTick(function () {

                Event.listen('conversation:load', function (uniqueConversationId) {
                    
                        Echo.private('conversation.' + this.uniqueConversationId)
                        .listen('.App.Events.Chat.UserSendChatMessage', function (event) {
                            console.log(event);
                        });

                }.bind(this));

            });
}

from echo.

maxpaynestory avatar maxpaynestory commented on June 9, 2024

Are you sure your Vue event 'conversation:load' is called and do you have access to Echo instance inside event. Have you created echo instance using.

window.Echo = new Echo();

There is a dot(.) at start of your 'App.Events.Chat.UserSendChatMessage' is that intentional?

from echo.

morloderex avatar morloderex commented on June 9, 2024

Can you see the event being triggered on the pusher debug console?
Maybe your name is incorrect as @maxpaynestory suggests?

from echo.

zedentox avatar zedentox commented on June 9, 2024

There is a similar issue concerning dots in events names and the listen function #119
I think it's the same problem.

from echo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.