diff --git a/Gcm.php b/Gcm.php index f0bf04b..c4f798e 100644 --- a/Gcm.php +++ b/Gcm.php @@ -153,8 +153,12 @@ public function sendMulti($tokens, $text, $payloadData = [], $args = []) try { // send a message $result = $this->getClient()->sendMulti($message, $tokens, $this->retryTimes); - $this->success = $result->getSuccess(); + if (!$this->success) { + foreach ($result->getResults() as $i => $r) { + $this->errors[$i+1] = $r->getErrorCode(); + } + } } catch (\InvalidArgumentException $e) { $this->errors[] = $e->getMessage(); // $deviceRegistrationId was null