reject and notification on request
This commit is contained in:
@@ -123,7 +123,7 @@ const youHaveAnInvitation = (invitedName, invitedEmail, senderProfile) => {
|
||||
|
||||
<p>You have been invited to be part of the new efforts to be connected through our website.</p>
|
||||
|
||||
<p>The socila part of our site is a place to be in contact with the espiritual family, read what is new for all the members and have access to the most recent teachings, as well as our catalog of courses.</p>
|
||||
<p>The social part of our site is a place to be in contact with the espiritual family, read what is new for all the members and have access to the most recent teachings, as well as our catalog of courses.</p>
|
||||
|
||||
<p><a href="https://social.emmint.com/">Register to make an account at https://social.emmint.com/</a></p>
|
||||
|
||||
@@ -137,6 +137,21 @@ ${senderProfile.profile.firstName} ${senderProfile.profile.lastName}
|
||||
sendEmail(invitedEmail, subject, html)
|
||||
}
|
||||
|
||||
const yourGroupHasARequestTemplate = (groupProfile, ownerEmail, senderProfile) => {
|
||||
let subject = senderProfile.profile.firstName + " wants to join " + groupProfile.profile.firstName + groupProfile.profile.lastName;
|
||||
let html = `
|
||||
<p>Hello Admin of ${groupProfile.profile.firstName} ${groupProfile.profile.lastName},</p>
|
||||
|
||||
<p>Your group, has a new request from ${senderProfile.profile.firstName} ${senderProfile.profile.lastName}</p>
|
||||
|
||||
<p>To respond to this request <a href="https://social.emmint.com/">go to the group</a></p>
|
||||
|
||||
<p>Blessings</p>
|
||||
<p>Emmanuel International Ministries</p>
|
||||
`;
|
||||
sendEmail(ownerEmail, subject, html)
|
||||
}
|
||||
|
||||
const Notifications = {
|
||||
sendEmail,
|
||||
async yourBookmarkedPostGotAComment(post, postProfile, senderProfile, message) {
|
||||
@@ -204,7 +219,14 @@ const Notifications = {
|
||||
DB.addNotification(toProfileId, notifBody, post._id);
|
||||
return youGotANewPostTemplate(profile, user.username, senderProfile, message);
|
||||
},
|
||||
youHaveAnInvitation
|
||||
youHaveAnInvitation,
|
||||
async yourGroupHasARequest(requesterProfileId, groupId){
|
||||
const DB = await DBGetter.getDB;
|
||||
const requesterProfile = await DB.getProfileCache(requesterProfileId);
|
||||
const groupProfile = await DB.getProfileCache(groupId);
|
||||
const user = await DB.getUserById(groupProfile.userid);
|
||||
yourGroupHasARequestTemplate(groupProfile, user.username, requesterProfile)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Notifications
|
||||
Reference in New Issue
Block a user