Skip to content

Commit

Permalink
Don't send old FCM token
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Sightler committed Jun 25, 2024
1 parent 622df12 commit 092677f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/ring-client-api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,11 @@ export class RingApi extends Subscribed {
}
})

// If we already have credentials, use them immediately
if (credentials) {
// If we already have credentials and they haven't been changed during registration, use them immediately
if (
credentials?.fcm?.token ===
this.restClient._internalOnly_pushNotificationCredentials?.fcm?.token
) {
onPushNotificationToken.next(credentials.fcm.token)
}
}
Expand Down

0 comments on commit 092677f

Please sign in to comment.