From 75d49a17d2d0e3286a70a41375d98836428bdfeb Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Mon, 16 Mar 2020 13:29:22 -0700 Subject: [PATCH 1/3] Fixing doc bug that conflated sound and tag options for Android notifications. --- src/index.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.d.ts b/src/index.d.ts index 5eb7498138..444c8fdc9c 100755 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -4709,6 +4709,15 @@ declare namespace admin.messaging { * * **Platforms:** Android */ + tag?: string + + /** + * The sound to play when the device receives the notification. Supports + * "default" or the filename of a sound resource bundled in the app. Sound files + * must reside in `/res/raw/`. + * + * **Platforms:** Android + */ sound?: string; /** From 5cb995593fae0869a5e79e5796dcb08c210e5ad4 Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Mon, 16 Mar 2020 16:24:02 -0700 Subject: [PATCH 2/3] Removing duplicate documentation for tag. --- src/index.d.ts | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 444c8fdc9c..be8fa8b9b1 100755 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -4616,7 +4616,14 @@ declare namespace admin.messaging { silent?: boolean; /** - * An identifying tag for the notification. + * Identifier used to replace existing notifications in the notification drawer. + * + * If not specified, each request creates a new notification. + * + * If specified and a notification with the same tag is already being shown, + * the new notification replaces the existing one in the notification drawer. + * + * **Platforms:** Android */ tag?: string; @@ -4699,18 +4706,6 @@ declare namespace admin.messaging { */ color?: string; - /** - * Identifier used to replace existing notifications in the notification drawer. - * - * If not specified, each request creates a new notification. - * - * If specified and a notification with the same tag is already being shown, - * the new notification replaces the existing one in the notification drawer. - * - * **Platforms:** Android - */ - tag?: string - /** * The sound to play when the device receives the notification. Supports * "default" or the filename of a sound resource bundled in the app. Sound files From 70e1793757f0bfb6ad0a4811b055ceb3e800e2e6 Mon Sep 17 00:00:00 2001 From: Eric Gilmore Date: Tue, 17 Mar 2020 09:56:14 -0700 Subject: [PATCH 3/3] Adding tag details in the right place this time, hopefully. --- src/index.d.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index be8fa8b9b1..0ad2f5d8eb 100755 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -4616,14 +4616,7 @@ declare namespace admin.messaging { silent?: boolean; /** - * Identifier used to replace existing notifications in the notification drawer. - * - * If not specified, each request creates a new notification. - * - * If specified and a notification with the same tag is already being shown, - * the new notification replaces the existing one in the notification drawer. - * - * **Platforms:** Android + * An identifying tag for the notification. */ tag?: string; @@ -4666,7 +4659,6 @@ declare namespace admin.messaging { * for code samples and detailed documentation. */ interface NotificationMessagePayload { - tag?: string; /** * The notification's body text. @@ -4715,6 +4707,18 @@ declare namespace admin.messaging { */ sound?: string; + /** + * Identifier used to replace existing notifications in the notification drawer. + * + * If not specified, each request creates a new notification. + * + * If specified and a notification with the same tag is already being shown, + * the new notification replaces the existing one in the notification drawer. + * + * **Platforms:** Android + */ + tag?: string; + /** * The notification's title. *