Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Richard Weinhold
PushNotifications
Commits
1cde1118
Verified
Commit
1cde1118
authored
Sep 29, 2020
by
Richard Weinhold
🔨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes the dummy callback to be called for each device
parent
283e2990
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/Handler/Dummy.php
src/Handler/Dummy.php
+7
-1
No files found.
src/Handler/Dummy.php
View file @
1cde1118
...
...
@@ -15,6 +15,10 @@ class Dummy extends Handler
*/
private
$callback
;
/**
* Dummy constructor.
* @param callable|null $sendCallback function(array $payload, string $deviceToken)
*/
public
function
__construct
(
?callable
$sendCallback
=
null
)
{
$this
->
callback
=
$sendCallback
;
...
...
@@ -59,7 +63,9 @@ class Dummy extends Handler
'priority'
=>
$priority
===
Config
::
PRIORITY_HIGH
?
'high'
:
'normal'
,
]);
call_user_func
(
$this
->
callback
,
$payload
);
foreach
(
$this
->
devices
as
$deviceToken
)
{
call_user_func
(
$this
->
callback
,
$payload
,
$deviceToken
);
}
return
$this
->
resetAndBuildFeedback
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment