Skip to content

Commit

Permalink
docs(NotificationUtils): Add JavaDoc to method updatePushDevices.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Nov 15, 2023
1 parent f770693 commit c7b05af
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ public static int getPushInfo(String toUser) {
return 0;
}

/**
* Poll the push middleware for the number of devices registered to receive push notifications
* for the specified user, and update the corresponding field in memory and Mongo.
* @param otpUser The {@link OtpUser} for which to check and update push devices.
*/
public static void updatePushDevices(OtpUser otpUser) {
int numPushDevices = getPushInfo(otpUser.email);
if (numPushDevices != otpUser.pushDevices) {
Expand Down

0 comments on commit c7b05af

Please sign in to comment.