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

[v5] Fix crash with direct influence but nil direct id #1327

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

nan-li
Copy link
Contributor

@nan-li nan-li commented Oct 25, 2023

Description

One Line Summary

Cherry-pick of #1311 from main.

Details

Motivation

Fixes a crash when a session has a direct influence but the direct id is nil.

This does not resolve getting into this situation in the first place since we should not have a direction session without a direct id, but this will at least prevent a crash when the issue happens. Instead we will log an error.

Testing

Unit testing

Unit test was also cherry-picked even though it will not run.

Manual testing

None on this PR

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
  • 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
  • [x]I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

Copy link
Contributor

@emawby emawby left a comment

Choose a reason for hiding this comment

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

I think this was a change that we might've ended up reverting because it caused other issues. Could you check the current state of main? Is this change there or was it reverted?

@nan-li
Copy link
Contributor Author

nan-li commented Oct 26, 2023

I think this was a change that we might've ended up reverting because it caused other issues. Could you check the current state of main? Is this change there or was it reverted?

Main contains these same changes. It was this PR #1240 that was reverted in #1251.

@nan-li nan-li merged commit f358fc1 into major_release_5.0.0 Oct 30, 2023
1 of 2 checks passed
@nan-li nan-li deleted the v5/fix/direct_id_crash branch October 30, 2023 18:54
nan-li added a commit that referenced this pull request Oct 30, 2023
[v5] Fix crash with direct influence but nil direct id
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.

2 participants