Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageWasSent event not connecting on font-end #276

Open
SaifulAzam opened this issue Jan 25, 2021 · 1 comment
Open

MessageWasSent event not connecting on font-end #276

SaifulAzam opened this issue Jan 25, 2021 · 1 comment

Comments

@SaifulAzam
Copy link

Hey i don't know if its bug or my end problem.
why the MessageWasSent event not connecting on font-end .
I used laravel-websockets and i see the event fried on websockets log but not fired on font-end .

font-end code.

 enablePusher = async () => {
    //@ts-ignore
    let client = await Pusher();
    client
      .private(
        `mc-chat-conversation.${this.props.route.params.conversation_id}`
      )
      .listen("Musonza\\Chat\\Eventing\\MessageWasSent", (e: any) => {
        console.log(e);
        // this.fetchAPiService();
      });
  };

any idea?

@dhi2
Copy link

dhi2 commented Apr 6, 2021

@SaifulAzam Put a dot before Musonza so it's .listen(".Musonza\\ ...

Reference: https://laravel.com/docs/8.x/broadcasting#namespaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants