From 87de30d257b0c98dddd0f1c185a702ce6b83eaa6 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Fri, 24 Oct 2025 23:02:03 +0200 Subject: [PATCH] Create share notif --- ...-notification.ts => create-notification.ts} | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) rename backend/api/src/{create-vote-notification.ts => create-notification.ts} (71%) diff --git a/backend/api/src/create-vote-notification.ts b/backend/api/src/create-notification.ts similarity index 71% rename from backend/api/src/create-vote-notification.ts rename to backend/api/src/create-notification.ts index 22542820..d5f2c0e6 100644 --- a/backend/api/src/create-vote-notification.ts +++ b/backend/api/src/create-notification.ts @@ -4,6 +4,24 @@ import {insertNotificationToSupabase} from 'shared/supabase/notifications' import {tryCatch} from "common/util/try-catch"; import {Row} from "common/supabase/utils"; +export const createShareNotifications = async () => { + const createdTime = Date.now(); + const id = `share-${createdTime}` + const notification: Notification = { + id, + userId: 'todo', + createdTime: createdTime, + isSeen: false, + sourceType: 'info', + sourceUpdateType: 'created', + sourceSlug: '/contact', + sourceUserAvatarUrl: 'https://firebasestorage.googleapis.com/v0/b/compass-130ba.firebasestorage.app/o/misc%2Ficon-outreach-outstrip-outreach-272151502.jpg?alt=media&token=6d6fcecb-818c-4fca-a8e0-d2d0069b9445', + title: 'Give us tips to reach more people', + sourceText: '250 members already! Tell us where and how we can best share Compass.', + } + return await createNotifications(notification) +} + export const createVoteNotifications = async () => { const createdTime = Date.now(); const id = `vote-${createdTime}`