adding webpush'
This commit is contained in:
@@ -229,6 +229,20 @@ userDB = (DB) => {
|
||||
});
|
||||
}
|
||||
|
||||
DB.setWebSubscription = (profileid, webSubscription)=>{
|
||||
const _id = DB.ObjectID(profileid);
|
||||
let update = {
|
||||
$set:{
|
||||
webSubscription
|
||||
}
|
||||
}
|
||||
if (userProfileCache[profileid]) delete userProfileCache[profileid];
|
||||
return DB.profileCols.updateOne({_id}, update).catch((err)=>{
|
||||
console.log(err);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
DB.addNotification = async (profileid, message, postid, commentIndx, actorid) => {
|
||||
const _id = DB.ObjectID(profileid);
|
||||
let update = {
|
||||
|
||||
Reference in New Issue
Block a user