Closed blah238 closed 9 years ago
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
This should be fixed by a recent commit.
I went through and changed all instances of
.done
to.exec
as described in https://github.com/ryancp/sailng/issues/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 user
publishAdd(id, alias, isAdded, [socketToOmit])``Any ideas what this is about?