The ability to pass subscription IDs

Created on 14 December 2023, about 1 year ago
Updated 15 December 2023, about 1 year ago

In some cases, it would be convenient to pass subscription IDs to the notification sending method, for example, to send personal notifications.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇷🇺Russia k.prozorov

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @k.prozorov
  • Status changed to Needs review about 1 year ago
  • 🇷🇺Russia k.prozorov

    I have prepared a patch that adds the ability to pass subscription IDs to the method
    Usage example:

    $subscriptions = [1, 2, 3]; // there can be any logic for obtaining subscription IDs.
    \Drupal::service('web_push.manager')->sendNotification(
      'Notification Title',
      'Notification Body',
      'noticiation-redirect-url',
      'notification-icon-url',
      \Drupal\web_push\Service\WebPushSender::URGENCY_HIGH
      '',
      $subscriptions
    );
    
  • First commit to issue fork.
  • Merge request !41.0.x → (Merged) created by yfiervil
  • Assigned to yfiervil
  • 🇫🇷France yfiervil

    Thanks for the suggestion.

    I have adjust a little your patch. I didn't test it for the moment.

  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024