News post emails

This commit is contained in:
aeroreyna
2022-02-27 11:04:10 -08:00
parent 3d9393c0b2
commit 57a91c0470
5 changed files with 86 additions and 14 deletions

View File

@@ -120,8 +120,8 @@ DB.getDB.then((DB) => {
let dbr = await DB.newPost(postObj);
post = postObj.toObj();
post._id = dbr.insertedId;
if (post.toProfile && post.toProfile != post.profileid) {
Notifications.youGotANewPost(post)
if ((post.toProfile && post.toProfile != post.profileid) || post.nonOrganicType == 'News') {
Notifications.youGotANewPost(post);
}
return res.json({
status: "ok",