|
@@ -214,12 +214,16 @@ class PushObject:
|
|
|
push_data['content_available'] = True
|
|
|
push_data['direct_boot_ok'] = True
|
|
|
message = messaging.Message(
|
|
|
+ notification=messaging.Notification(
|
|
|
+ title=msg_title,
|
|
|
+ body=msg_text
|
|
|
+ ),
|
|
|
data=push_data,
|
|
|
token=token_val,
|
|
|
)
|
|
|
# Send a message to the device corresponding to the provided
|
|
|
# registration token.
|
|
|
- result = messaging.send(message)
|
|
|
+ result = messaging.send(message, dry_run=True)
|
|
|
LOGGER.info('fcm推送结果:{}'.format(result))
|
|
|
return True
|
|
|
except Exception as e:
|