forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreminder-service.ts
More file actions
36 lines (32 loc) · 935 Bytes
/
Copy pathreminder-service.ts
File metadata and controls
36 lines (32 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { Injectable } from "@nestjs/common";
import { ActivitiesService } from "./activities.service";
/**
* Example 3: Reminder Service Integration
* Track reminder notifications
*/
@Injectable()
export class ReminderServiceExample {
constructor(private readonly activitiesService: ActivitiesService) {}
async sendPaymentReminder(
senderId: string,
recipientId: string,
splitId: string,
amountDue: number
) {
// Send reminder logic (email, push notification, etc.)...
// Track reminder sent for sender
await this.activitiesService.trackReminderSent(
senderId,
splitId,
recipientId,
{
amountDue,
reminderType: "payment_due",
sentAt: new Date().toISOString(),
}
);
// Optionally track as a received reminder for recipient
// This could use the same tracking or a different approach
// depending on your UX requirements
}
}