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

Notification click not fired without iam module #1931

Merged

Conversation

jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Dec 4, 2023

Description

One Line Summary

Allow notification on-click event when InAppMessages module is not included

Details

Motivation

Previously, a client might have configured a notification click event without including the InAppMessages module. However, this event wouldn't trigger if the app wasn't already opened. The code change resolves this issue by enabling the app to open when a click event is registered.

Scope

Logic on whether a notification is openable under NotificationLifecycleService

Manual testing

  1. include only the core and the notification module to the sdktest app
  2. run on a Pixel 7 api 33 emulator to replicate the bug
  3. make the code change and notice that the click event is successfully called

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

Copy link
Contributor

@brismithers brismithers left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @emawby, @jennantilla, @jkasten2, and @nan-li)

Copy link
Contributor

@jennantilla jennantilla left a comment

Choose a reason for hiding this comment

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

Looks great! Tested that I am able to open the app from a notification click and see handler fired.

Revert "Allow app to be opened on notification clicked if onclick event is added"

This reverts commit 27070b2.

Allow app to be opened on notification clicked if onclick event is added
@jinliu9508 jinliu9508 force-pushed the notification-click-not-fired-without-IAM-module branch from 8235236 to 4db5412 Compare December 6, 2023 20:05
@jinliu9508 jinliu9508 merged commit 0d4c544 into user-model/main Dec 11, 2023
2 checks passed
@jinliu9508 jinliu9508 deleted the notification-click-not-fired-without-IAM-module branch December 11, 2023 19:04
@jennantilla jennantilla mentioned this pull request Dec 28, 2023
jinliu9508 added a commit that referenced this pull request Jan 31, 2024
…without-IAM-module

Notification click not fired without iam module
jinliu9508 added a commit that referenced this pull request Jan 31, 2024
…without-IAM-module

Notification click not fired without iam module
jinliu9508 added a commit that referenced this pull request Feb 6, 2024
…without-IAM-module

Notification click not fired without iam module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants