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

Invalid usage of userpublishAdd(...) #8

Closed
blah238 opened this issue Apr 28, 2014 · 2 comments
Closed

Invalid usage of userpublishAdd(...) #8

blah238 opened this issue Apr 28, 2014 · 2 comments

Comments

@blah238
Copy link

blah238 commented Apr 28, 2014

I went through and changed all instances of .done to .exec as described in #5.

When running the sailng app and entering messages, the following error appears in the node console, but everything appears to still operate correctly (messages appear on all connected clients).

error: Invalid usage of userpublishAdd(id, alias, isAdded, [socketToOmit])``

Any ideas what this is about?

@ryancp
Copy link
Owner

ryancp commented May 15, 2014

This definitely has to do with the afterCreate method in Message,js model.
That call basically adds the associated user to the message model that gets sent to the frontend so that the username can be displayed immediately upon a message creation.

There is probably a better way within sails to handle this idea which I need to revisit. I explained more in a post on the sails google group: https://groups.google.com/d/msg/sailsjs/BiCMKRvJULE/ck7Cl5NTt4MJ

@ryancp
Copy link
Owner

ryancp commented Jan 28, 2015

This should be fixed by a recent commit.

@ryancp ryancp closed this as completed Jan 28, 2015
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