We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2579fea commit c5e7cd2Copy full SHA for c5e7cd2
src/ExpoMessage.php
@@ -47,7 +47,7 @@ class ExpoMessage
47
*
48
* @var string
49
*/
50
- protected $channelId = 'Default';
+ protected $channelId = '';
51
52
/**
53
* The json data attached to the message.
@@ -205,14 +205,17 @@ public function setJsonData($data)
205
206
public function toArray()
207
{
208
- return [
+ $message = [
209
'title' => $this->title,
210
'body' => $this->body,
211
'sound' => $this->sound,
212
'badge' => $this->badge,
213
'ttl' => $this->ttl,
214
- 'channelId' => $this->channelId,
215
- 'data' => $this->jsonData,
+ 'data' => $this->jsonData
216
];
+ if (!empty($this->channelId)) {
217
+ $message['channelId'] = $this->channelId;
218
+ }
219
+ return $message;
220
}
221
0 commit comments