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

Change the sendSelfNotification method to use local push functionality #1183

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

rgomezp
Copy link
Contributor

@rgomezp rgomezp commented Jul 11, 2024

Description

1 Line Summary

Change the sendSelfNotification method to use local push functionality.

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

  • Call OneSignal.sendSelfNotification()
  • See that the notification is shown

Testing

OneSignal.sendSelfNotification('Title', 'message', 'https://google.com', 'https://t3.ftcdn.net/jpg/03/08/73/34/360_F_308733458_QBzwMVu8ZzdGEp9Wwq1fAYaDgtP3UVwl.jpg', { test: 'foo' }, [{
    action: 'like-button',
    title: 'Like',
    icon: 'https://image.similarpng.com/very-thumbnail/2020/06/Icon-like-button-transparent-PNG.png'
}]);
Feature Chrome Firefox Windows Firefox Mac Safari
Welcome Notification
Title
Message
Launch Url Click
Data
Button Displayed
Buttons Displayed
Button Click

Checklist

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

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed

Related Tickets



This change is Reviewable

@rgomezp rgomezp changed the title Send self local 2 Change the sendSelfNotification method to use local push functionality Jul 11, 2024
src/OneSignal.ts Outdated Show resolved Hide resolved
src/OneSignal.ts Outdated Show resolved Hide resolved
@rgomezp rgomezp force-pushed the send-self-local-2 branch from 4ae0a6b to 5426321 Compare July 12, 2024 21:24
express_webpack/index.html Outdated Show resolved Hide resolved
src/OneSignalApi.ts Show resolved Hide resolved
@rgomezp rgomezp requested a review from jkasten2 July 15, 2024 16:34
rgomezp added 3 commits July 15, 2024 11:41
Motivation: we are removing support for unauthenticated notif create calls

Update the welcome notification to use sendSelfNotification
@rgomezp rgomezp force-pushed the send-self-local-2 branch from c38c5c6 to 49f8f7f Compare July 15, 2024 16:41
@rgomezp rgomezp merged commit 24b3ece into player-model-main Jul 15, 2024
1 of 2 checks passed
@rgomezp rgomezp deleted the send-self-local-2 branch July 15, 2024 16:41
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