[SOLVED] [ Socialize : messaging ] How to send message & chat Invitation?


@copleykj Hi there,

I am successfully using your social:friendship package and was trying to add messaging between them. I already have a one - one chat system but would like to move to social :messaging. I can save a new conversation but can’t seem to be able to add a user to it.

conversation = new Conversation().save(); user=Meteor.users.findOne({ username:Router.current().params.username})._id; participants = [Meteor.user()._id, user]; conversation.addParticipants(participants);

in the console, I can see that new conversations have been saved. But it shows only one participant, like this:

so the conversations do exist. all that is left, is to add a participant to it and then route to the room. But when I try to add a participant, it shows this,

any pointers will be helpful, cheers!!


guess what? the super kind dev sorted the problem himself. Just a little update of the package fixed the issue :smiley: .

Man @copleykj is awesome!!


Sorry it took so long.


@copleykj hey thanks kelly . Any chance of a 10 minute quick youtube video of “socialize : messaging” package ?? I know you are super busy, but a small hint will help a lot of people I think, (including me). The friendship demo was awesome and it really helped me understand the friendShip package.

What I am asking for is Just a tiny messaging demo & Not the whole-social-network type demo where you integrate all the packages (though that would be nice & I know its in your list!! ). Because I think a lot of bad code can be avoided with a little 5-10 minute demo. I don’t want to struggle like Tom!!


I made a youtube video showing the issue I am facing. As soon as I use

.addParticipant( " userId" ) , it creates 17 more entries in the participant db. Is that intended? Also what do I put in the

sendMessage( "body", callback) method as callback ?

On other hand, I think that if someone wants to add someone to a chat,
he himself should be able to it. Right now I can only add another user to the conversation from his own console using

.addParticipant( user )

where he himself is the currentUser.

Is it because I am using auto publish yet that I am facing this issue? In friendship package, as soon as a user requests a friendship, a requesterId and a userId is generated on the fly & that can be used for simple notification by finding all the requests that have been made for this user by using

Meteor.requests.find({ userId })

That was real convenient. I guess something like that will be great for messaging too!


Again, Awesome-super-fast response from the dev sorting out noob problems :smiley: I am speechless. will post the answer here as soon as I get mine sorted