Closed
Conversation
(cherry picked from commit 264b679)
andrebispo5
approved these changes
Nov 14, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bitwarden.atlassian.net/browse/SG-823
Type of change
Objective
One of the ways that a push token can be sent to the server (to subsequently be passed to the Azure Notification Hub) is on a login request. The server-side code will check for the Device information on the
POSTbody and update the push token for the given user and device, if it exists.This change is to populate the
PushTokenproperty on that object before it is sent on the request. Previously, all properties were set on the object except for the push token.Code changes
DeviceRequest.cs: Added parameter to constructor for push token.
AuthService.cs: Looked up current push token from state service and passed that in to the object that is used to send the push token on the login request.
PushNotificationListenerService.cs:: Previously,
SetCurrentPushTokenAsync()was only called if we were on an Android device, as it was only used for handling Android's re-generation of tokens (we compare Registered vs. Current tokens and update when they don't match). However, now we need a way to keep the current token in state even for iOS devices, as we'll be using it on login requests.bitwarden/server#2404 is also associated with this same problem.
Before you submit
dotnet format --verify-no-changes) (required)