Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple notification channels in middleware #185

Merged
merged 20 commits into from
Sep 12, 2023

Conversation

JymDyerIBI
Copy link
Contributor

@JymDyerIBI JymDyerIBI commented May 17, 2023

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing
  • The description lists all relevant PRs included in this release (remove this if not merging to master)

Description

WIP: Middleware preparing to have multiple notification channels, anticipating addition of push notifications.

@JymDyerIBI JymDyerIBI self-assigned this May 17, 2023
@JymDyerIBI
Copy link
Contributor Author

Requires these configuration properties:

PUSH_API_KEY: STSFYTHREMGUWXML
PUSH_API_URL: https://demo.ibigroupmobile.com/ext_api/otp_push/sound_transit

Note that we only have sound_transit at this time.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this PR is supposed to contain fetching of pushDevices, but otherwise LGTM.

@binh-dam-ibigroup binh-dam-ibigroup marked this pull request as ready for review August 15, 2023 20:29
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking previous approval back... @JymDyerIBI Could you address the test failures, please?

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tweak, and with that the PR will be good to go.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies, one more change: #185 (comment)

Copy link
Contributor

@philip-cline philip-cline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, a check needs to be added to ensure the push notification config params are set before retrieving the number of registered devices and before sending push notifications.

…I_URL. Make inner sendPush() method package scope.
@JymDyerIBI
Copy link
Contributor Author

JymDyerIBI commented Aug 31, 2023

So this last change will make the public NotificationUtils#sendPush() and #getPushInfo() do nothing and simply return null or 0 respectively if the config properties are not set. There's also an inner sendPush() method that I changed the contract of to not be public so we don't have to duplicate this test.

…I_URL. Make inner sendPush() method package scope.
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@binh-dam-ibigroup binh-dam-ibigroup added the BLOCKED Blocked (waiting on another PR to be merged) label Sep 5, 2023
@binh-dam-ibigroup binh-dam-ibigroup merged commit d6ae410 into dev Sep 12, 2023
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the multiple-notification-channels branch September 12, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKED Blocked (waiting on another PR to be merged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants