Skip to content

Commit

Permalink
[notification-hubs] Fix FCMV1 bugs (#29507)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR

- @azure/notification-hubs

### Issues associated with this PR

- #29465

### Describe the problem that is addressed by this PR

Fixes the right signatures for the FCM versus FCM Legacy.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
  • Loading branch information
mpodwysocki authored Apr 29, 2024
1 parent 3f3340d commit e905eaf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
13 changes: 4 additions & 9 deletions sdk/notificationhubs/notification-hubs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# Release History

## 1.2.2 (Unreleased)

### Features Added

### Breaking Changes
## 1.2.2 (2024-04-29)

### Bugs Fixed

### Other Changes
- Fixed FirebaseV1 Notification to use the correct `data` and create the wrapper `message`.
- [#29404](https://github.com/Azure/azure-sdk-for-js/issues/29404)
- [#29371](https://github.com/Azure/azure-sdk-for-js/issues/29371)

## 1.2.1 (2024-04-25)

### Bugs Fixed

- Fixed FirebaseV1 Notification to use the correct `data` and create the wrapper `message`.
- [#29404](https://github.com/Azure/azure-sdk-for-js/issues/29404)
- [#29371](https://github.com/Azure/azure-sdk-for-js/issues/29371)
- Fixed Firebase query for `listRegistrationsByChannel` to use the correct `channel` query parameter.
- [#29372](https://github.com/Azure/azure-sdk-for-js/issues/29372)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ export function createFcmV1RegistrationDescription(description: FcmV1Registratio
export function createFcmV1TemplateRegistrationDescription(description: FcmV1TemplateRegistrationDescriptionCommon): FcmV1TemplateRegistrationDescription;

// @public
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseLegacyNativeMessage): string;

// @public
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string;
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;

// @public
export function createTagExpression(tags: string[]): string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ export function createFcmV1RegistrationDescription(description: FcmV1Registratio
export function createFcmV1TemplateRegistrationDescription(description: FcmV1TemplateRegistrationDescriptionCommon): FcmV1TemplateRegistrationDescription;

// @public
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;
export function createFirebaseLegacyNotificationBody(nativeMessage: FirebaseLegacyNativeMessage): string;

// @public
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string;
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessageEnvelope): string;

// @public
export function createTagExpression(tags: string[]): string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export interface FirebaseLegacyWebNativePayload {
* @returns The JSON body to send to Notification Hubs.
*/
export function createFirebaseLegacyNotificationBody(
nativeMessage: FirebaseV1NativeMessageEnvelope,
nativeMessage: FirebaseLegacyNativeMessage,
): string {
return JSON.stringify(nativeMessage);
}
Expand Down Expand Up @@ -874,7 +874,9 @@ export interface FirebaseV1FcmOptions {
* @param nativeMessage - The native message payload to send to Notification Hubs.
* @returns The JSON body to send to Notification Hubs.
*/
export function createFirebaseV1NotificationBody(nativeMessage: FirebaseV1NativeMessage): string {
export function createFirebaseV1NotificationBody(
nativeMessage: FirebaseV1NativeMessageEnvelope,
): string {
return JSON.stringify(nativeMessage);
}

Expand Down

0 comments on commit e905eaf

Please sign in to comment.