From 9a14f3692b40f93f7d51107adb92f90da7d08aab Mon Sep 17 00:00:00 2001 From: "Y Minh Le (Ley)" Date: Thu, 23 Dec 2021 23:17:22 +0700 Subject: [PATCH] Add paremeter 'notify_participants=false' when the flag 'notifyParticipants is false' (#34) * Add paremeter 'notify_participants=false' when the flag 'notifyParticipants is false' * Update CHANGELOG.md Co-authored-by: Ley Co-authored-by: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> --- CHANGELOG.md | 2 ++ src/main/java/com/nylas/Events.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cdfcc0e..7df4ff63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ This section contains changes that have been committed but not yet released. ### Changed +- Added `false` parameter when `notifyParticipants` is false + ### Deprecated ### Fixed diff --git a/src/main/java/com/nylas/Events.java b/src/main/java/com/nylas/Events.java index 457fce0e..958e95d6 100644 --- a/src/main/java/com/nylas/Events.java +++ b/src/main/java/com/nylas/Events.java @@ -95,7 +95,9 @@ private void validateConferencing(Event event) { private static final Map NOTIFY_PARTICIPANTS_PARAMS = Collections.unmodifiableMap(Maps.of("notify_participants", "true")); + private static final Map DONT_NOTIFY_PARTICIPANTS_PARAMS + = Collections.unmodifiableMap(Maps.of("notify_participants", "false")); private static Map getExtraQueryParams(boolean notifyParticipants) { - return notifyParticipants ? NOTIFY_PARTICIPANTS_PARAMS : null; + return notifyParticipants ? NOTIFY_PARTICIPANTS_PARAMS : DONT_NOTIFY_PARTICIPANTS_PARAMS; } }