@@ -23,10 +23,12 @@ class FCMSender extends HTTPSender
23
23
* @param Options|null $options
24
24
* @param PayloadNotification|null $notification
25
25
* @param PayloadData|null $data
26
+ * @param string $senderId
27
+ * @param string $serverKey
26
28
*
27
29
* @return DownstreamResponse|null
28
30
*/
29
- public function sendTo ($ to , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null )
31
+ public function sendTo ($ to , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null , $ senderId = null , $ serverKey = null )
30
32
{
31
33
$ response = null ;
32
34
@@ -45,7 +47,7 @@ public function sendTo($to, Options $options = null, PayloadNotification $notifi
45
47
}
46
48
}
47
49
} else {
48
- $ request = new Request ($ to , $ options , $ notification , $ data );
50
+ $ request = new Request ($ to , $ options , $ notification , $ data, null , $ senderId , $ serverKey );
49
51
$ responseGuzzle = $ this ->post ($ request );
50
52
51
53
$ response = new DownstreamResponse ($ responseGuzzle , $ to , $ this ->logger );
@@ -61,12 +63,14 @@ public function sendTo($to, Options $options = null, PayloadNotification $notifi
61
63
* @param Options|null $options
62
64
* @param PayloadNotification|null $notification
63
65
* @param PayloadData|null $data
66
+ * @param string $senderId
67
+ * @param string $serverKey
64
68
*
65
69
* @return GroupResponse
66
70
*/
67
- public function sendToGroup ($ notificationKey , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null )
71
+ public function sendToGroup ($ notificationKey , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null , $ senderId = null , $ serverKey = null )
68
72
{
69
- $ request = new Request ($ notificationKey , $ options , $ notification , $ data );
73
+ $ request = new Request ($ notificationKey , $ options , $ notification , $ data, null , $ senderId , $ serverKey );
70
74
71
75
$ responseGuzzle = $ this ->post ($ request );
72
76
@@ -80,12 +84,14 @@ public function sendToGroup($notificationKey, Options $options = null, PayloadNo
80
84
* @param Options|null $options
81
85
* @param PayloadNotification|null $notification
82
86
* @param PayloadData|null $data
87
+ * @param string $senderId
88
+ * @param string $serverKey
83
89
*
84
90
* @return TopicResponse
85
91
*/
86
- public function sendToTopic (Topics $ topics , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null )
92
+ public function sendToTopic (Topics $ topics , Options $ options = null , PayloadNotification $ notification = null , PayloadData $ data = null , $ senderId = null , $ serverKey = null )
87
93
{
88
- $ request = new Request (null , $ options , $ notification , $ data , $ topics );
94
+ $ request = new Request (null , $ options , $ notification , $ data , $ topics, $ senderId , $ serverKey );
89
95
90
96
$ responseGuzzle = $ this ->post ($ request );
91
97
0 commit comments