diff --git a/backend/api/src/send-search-notifications.ts b/backend/api/src/send-search-notifications.ts index 7c6d8c62..d2c53f25 100644 --- a/backend/api/src/send-search-notifications.ts +++ b/backend/api/src/send-search-notifications.ts @@ -69,10 +69,10 @@ export const sendSearchNotifications: APIHandler<'send-search-notifications'> = matches[row.creator_id].matches.push({ id: row.creator_id, description: {filters: row.search_filters, location: row.location}, - matches: [profiles.map((item: any) => ({ + matches: profiles.map((item: any) => ({ name: item.name, username: item.username, - }))], + })), }) } console.log(JSON.stringify(matches, null, 2)) diff --git a/backend/email/emails/functions/helpers.tsx b/backend/email/emails/functions/helpers.tsx index 0a1c39de..bb293fa7 100644 --- a/backend/email/emails/functions/helpers.tsx +++ b/backend/email/emails/functions/helpers.tsx @@ -1,7 +1,6 @@ import {PrivateUser, User} from 'common/user' import {getNotificationDestinationsForUser} from 'common/user-notification-preferences' import {sendEmail} from './send-email' -import {NewMatchEmail} from '../new-match' import {NewMessageEmail} from '../new-message' import {NewEndorsementEmail} from '../new-endorsement' import {Test} from '../test' @@ -12,33 +11,33 @@ import NewSearchAlertsEmail from "email/new-search_alerts"; const from = 'Compass ' -export const sendNewMatchEmail = async ( - privateUser: PrivateUser, - matchedWithUser: User -) => { - const {sendToEmail, unsubscribeUrl} = getNotificationDestinationsForUser( - privateUser, - 'new_match' - ) - if (!privateUser.email || !sendToEmail) return - const lover = await getLover(privateUser.id) - if (!lover) return - - return await sendEmail({ - from, - subject: `You have a new match!`, - to: privateUser.email, - react: ( - - ), - }) -} +// export const sendNewMatchEmail = async ( +// privateUser: PrivateUser, +// matchedWithUser: User +// ) => { +// const {sendToEmail, unsubscribeUrl} = getNotificationDestinationsForUser( +// privateUser, +// 'new_match' +// ) +// if (!privateUser.email || !sendToEmail) return +// const lover = await getLover(privateUser.id) +// if (!lover) return +// +// return await sendEmail({ +// from, +// subject: `You have a new match!`, +// to: privateUser.email, +// react: ( +// +// ), +// }) +// } export const sendNewMessageEmail = async ( privateUser: PrivateUser, diff --git a/common/src/love/bookmarked_searches.ts b/common/src/love/bookmarked_searches.ts index f6c14c9a..3e59dd89 100644 --- a/common/src/love/bookmarked_searches.ts +++ b/common/src/love/bookmarked_searches.ts @@ -13,7 +13,7 @@ export interface MatchesType { filters: any; // You might want to replace 'any' with a more specific type location: any; // You might want to replace 'any' with a more specific type }; - matches: any[]; // You might want to replace 'any' with a more specific type + matches: MatchUser[]; // You might want to replace 'any' with a more specific type id: string }