googleapis / googleapis/google-api-nodejs-client
Calendar - node - Can I send an event update email to new attendees only?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 12.3k
- Forks
- 2k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
What you're trying to do
I'm trying to create an app on which users can subscribe to an event.
My plan is to create an event, then update it every time a user wants to attend by updating or patching the event attendees.
I would like the users to receive the google email with the event details when they register.
What code you've already tried
Using this code, all the attendees will receive an email every time a new attendee is added. In this scenario, I would like only new attendees to receive the email.
// [...] abridged auth and calendar setup
authWithImpersonation.getClient().then((auth: any) => {
getEvent().then((ev: any) => {
const newAttendees = ev.data.attendees
? [
...ev.data.attendees,
{
email: 'user@domain.com',
},
]
: [
{
email: 'user@domain.com',
},
];
let eventPatch = {
attendees: newAttendees,
};
calendarWithImpersonation.events.patch({
auth,
eventId: ev.data.id,
calendarId: GCP_CALENDAR_CALENDAR_ID,
resource: eventPatch,
sendUpdates: 'all', // Hello there
});
});
});
Is there a way to dynamically choose who gets notified?
If you have any other suggestion on how to achieve my goal I'm open to it, this is a greenfield project.
Thank you
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit dem setup von authWithImpersonation im Issue und dem Aufruf von calendarWithImpersonation.events.patch, wobei Sie sich auf die Aktualisierung von attendees und die Option sendUpdates: 'all' konzentrieren. Prüfen Sie das relevante Verhalten der Google Calendar API und ermitteln Sie, ob Benachrichtigungen nur an neu hinzugefügte attendees gesendet werden können; dokumentieren Sie den unterstützten Ansatz oder die Einschränkung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- nodejs, typescript
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 20/100