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

Failed to send the message by testing the tutorial #11

Open
andrescefe opened this issue Oct 13, 2017 · 3 comments
Open

Failed to send the message by testing the tutorial #11

andrescefe opened this issue Oct 13, 2017 · 3 comments

Comments

@andrescefe
Copy link

Hello, I have this error "TypeError: self.rooms[setup.to].publish is not a function" when sending the message I already have the keys in pubnub, what should I do to make it work?
angular version 1.6.6

@Bxggi3
Copy link

Bxggi3 commented Dec 7, 2017

Having the Same Issue

@venkateshmalgireddy
Copy link

venkateshmalgireddy commented Mar 20, 2018

Change .publish to .message in the angular-chat.js module. That is the function which publish messages to server in the socketio.js module

@srivassumit
Copy link

srivassumit commented Apr 12, 2018

To be more specific, open the \bower_components\angular-chat\angular-chat.js file. (or \node_modules\angular-chat\angular-chat.js if using npm)

In that file, go to line number 87, where it says
return self.rooms[setup.to].publish({
change it to:
return self.rooms[setup.to].message({

With this, I was able to get it to get rid of this error "TypeError: self.rooms[setup.to].publish is not a function"

casualuser added a commit to casualuser/angularjs-chat that referenced this issue Sep 14, 2018
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

4 participants