add flutter
This commit is contained in:
Regular → Executable
+11
@@ -48,6 +48,17 @@ class Notification extends REST_Controller
|
||||
return;
|
||||
}
|
||||
|
||||
$this->load->helper('fcm_v1_helper');
|
||||
|
||||
// Always verify FCM token is ready before using Firebase service (as in test / panel send).
|
||||
if (!fcm_v1_validate_token()) {
|
||||
$this->response(array(
|
||||
'code' => '503',
|
||||
'message' => 'fcm_token_not_ready',
|
||||
), 200);
|
||||
return;
|
||||
}
|
||||
|
||||
$target = isset($decoded['target']) ? trim($decoded['target']) : '';
|
||||
$is_topic = !empty($decoded['is_topic']);
|
||||
$data = isset($decoded['data']) && is_array($decoded['data']) ? $decoded['data'] : array();
|
||||
|
||||
Reference in New Issue
Block a user