Comments (2)
I was about to post the same issue. I believe it's stemming from this:
FriendsCollection.after.insert(function(userId, document){
var user = User.createEmpty(document.friendId);
var friend = User.createEmpty(userId);
//this if is a dirty dirty hack, unfortunately collection-hooks bypasses
//collection2 with simple-schema when using collection.direct and doesn't
//insert a proper record since we rely on simple-schema's autoValue feature
if(friend.hasRequestFrom(user)){ //TODO: find a way around this hack
//remove the the defunct request
RequestsCollection.remove({userId:document.userId, requesterId:document.friendId});
//create a reverse record for the other user
//so the connection happens for both users
FriendsCollection.insert({userId:document.friendId, friendId:userId});
}
});
FriendsCollection.after.remove(function (userId, document) {
//when a friend record is removed, remove the reverse record for the
//other users so that the friend connection is terminated on both ends
FriendsCollection.direct.remove({userId:document.friendId, friendId:userId});
});
from socialize-friendships.
Was actually a change made to the schema. Should be all set now.
from socialize-friendships.
Related Issues (20)
- Error when installing on socailize on my Meteor project HOT 4
- Access denied when trying to send a requestFriendship() HOT 2
- Running request.deny() throws error HOT 3
- Please fix documentation error for Instance Methods
- No such function: isFriendsWith HOT 1
- Publications HOT 1
- what if: meteor remove insecure autopublish HOT 7
- Publication Wiki could use a publication for blocks
- Help making requests on the server HOT 2
- I think there's a little error on pendingRequests method HOT 7
- insert a new "seen:false" field in the request Schema HOT 3
- Is there a way to "sort" the users' friends by a field on the profile HOT 1
- Publish and Subscribe to Friends of the user whose profile page was visited by the logged In user HOT 2
- Problems displaying requests in React HOT 5
- request.requester() won't work if I refresh the page. HOT 2
- TypeError: user is null meteor.js:930:11 .hasRequestFrom@http://localhost:3000/packages Socialize friendship meteor HOT 17
- Friend request to yourself HOT 3
- Wishlist HOT 1
- denied requests are still showing up in subscription HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socialize-friendships.