I have made an app that sends your contact book to the server, checks if the phone numbers are users, and returns an array of registered users.
Today I opened the app at the same time than a friend, and he had on his phone the list of my contacts at first. And then when he refreshes the list, he gets his own contacts.
Is it possible that Meteor returns data to the wrong user?
If you are filtering the data on the client, your server is still sending unfiltered data, meaning that you and your friend both have access to all of the data. You will need to turn off autopublish, and create publications and subscriptions in order to limit the data that each of you has access to.
I create a first list on the client will all contacts, then I call a method on the server.
The method create an array on the server filtering the phone numbers which are in the database.
I think that when the app is started on 2 phones simultaneously, they both call this method, but the 2 occurrences deal with the same filtered array.
Is this possible?
Then I guess I have to give a unique name to the array created on the server…