bookmarks in progress missing notifications

This commit is contained in:
Adolfo Reyna
2021-09-14 23:00:23 -07:00
parent 0907c1c1b5
commit 55c0c10a35
4 changed files with 53 additions and 5 deletions

View File

@@ -25,7 +25,11 @@ const Notifications = {
async youGotANewPostComment(postId, whoPostedId, message){
const DB = await DBGetter.getDB;
const post = await DB.getPost(postId)
if(post.bookmarks){
//send notification to boorkmaked profiles
}
const profile = await DB.getProfileCache(post.profileid);
if(profile.isCourse) return 0; //Course owners do not need to receive notifs
const user = await DB.getUserById(profile.userid);
const senderProfile = await DB.getProfileCache(whoPostedId);
let subject = senderProfile.profile.firstName + " comment on your post";