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

Fix direct session count #1240

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Fix direct session count #1240

merged 1 commit into from
Apr 13, 2023

Conversation

shepherd-l
Copy link
Contributor

@shepherd-l shepherd-l commented Mar 29, 2023

Description

One Line Summary

Reset direct sessions when the session ends.

Details

Motivation

Fix incorrect direct session count for notifications, prevents a direct session count from being sent up twice for the same notification.

Testing

Manual testing

Tested sending notifications from a direct session to another direct session, app build with Xcode 14.2 with the OneSignal example app on an iPhone 12 with iOS 15.5.

Steps

  1. Send 2 notifications
  2. Open notification 1 and immediately background the app
  3. Wait for session to end (30+ seconds)
  4. Open notification 2

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
  • 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

When a session ends, reset the sessions' direct influences to prevent a direct session from being sent up twice for the same notification
@jennantilla
Copy link
Contributor

Very cool to see the solution for this issue! Resetting the direct session count when the session ends prevents any new direct sessions from being counted multiple times for the same notification.

@emawby emawby merged commit 0890af2 into main Apr 13, 2023
@emawby emawby deleted the fix/directSessionCount branch April 13, 2023 17:32
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.

3 participants