Notification when accepted on private groups
This commit is contained in:
@@ -137,15 +137,15 @@ DB.getDB.then((DB)=>{
|
||||
}
|
||||
const profileAcepted = DB.ObjectID(req.body.profileid);
|
||||
DB.acceptGroupJoinReq(profileAcepted, groupidBody || groupid);
|
||||
//Add Notification to accepted user
|
||||
//Notifications.yourGroupHasARequest(profileAcepted, groupidBody || groupid)
|
||||
//Send Notification to accepted user
|
||||
Notifications.yourGroupRequestAccepted(profileAcepted, groupidBody || groupid)
|
||||
return res.json({
|
||||
status: "ok"
|
||||
});
|
||||
});
|
||||
|
||||
router.post("/groups/reject", async (req, res) => {
|
||||
//This function should be called to accept the join request
|
||||
//This function should be called to reject the join request
|
||||
//of an user that attempt to join a private group.
|
||||
const groupid = getProfileId(req); //It needs to have this profile context
|
||||
const groupidBody = req.body.groupid ? DB.ObjectID(req.body.groupid) : undefined;
|
||||
|
||||
Reference in New Issue
Block a user