瀏覽代碼

华为推送

linhaohong 7 月之前
父節點
當前提交
581ec51e9c
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      Service/DevicePushService.py

+ 2 - 8
Service/DevicePushService.py

@@ -452,10 +452,7 @@ class DevicePushService:
                         push_result = PushObject.android_jpush(**kwargs)
                         push_result = PushObject.android_jpush(**kwargs)
 
 
                 elif push_type == 3:
                 elif push_type == 3:
-                    if kwargs["app_bundle_id"]:
-                        huawei_push_object = HuaweiPushObject(appBundleId=kwargs["app_bundle_id"])
-                    else:
-                        huawei_push_object = HuaweiPushObject()
+                    huawei_push_object = HuaweiPushObject(appBundleId=kwargs["appBundleId"])
                     huawei_push_object.send_push_notify_message(**push_kwargs)
                     huawei_push_object.send_push_notify_message(**push_kwargs)
                 elif push_type == 4:  # android xmpush
                 elif push_type == 4:  # android xmpush
                     if kwargs['event_type'] in EventTypeEnumObj.DATA_PUSH_EVENT_TYPE_LIST.value:
                     if kwargs['event_type'] in EventTypeEnumObj.DATA_PUSH_EVENT_TYPE_LIST.value:
@@ -797,10 +794,7 @@ class DevicePushService:
                 push_result = PushObject.android_fcm_push_v1(
                 push_result = PushObject.android_fcm_push_v1(
                     uid, appBundleId, token_val, n_time, event_type, msg_title, msg_text, uid, channel, image_url)
                     uid, appBundleId, token_val, n_time, event_type, msg_title, msg_text, uid, channel, image_url)
             elif push_type == 3:
             elif push_type == 3:
-                if appBundleId:
-                    huawei_push_object = HuaweiPushObject(appBundleId=appBundleId)
-                else:
-                    huawei_push_object = HuaweiPushObject()
+                huawei_push_object = HuaweiPushObject(appBundleId=appBundleId)
                 push_result = huawei_push_object.send_push_notify_message(
                 push_result = huawei_push_object.send_push_notify_message(
                     token_val=token_val, msg_title=msg_title, msg_text=msg_text, uid=uid, event_type=event_type,
                     token_val=token_val, msg_title=msg_title, msg_text=msg_text, uid=uid, event_type=event_type,
                     n_time=n_time, image_url=image_url, channel=channel)
                     n_time=n_time, image_url=image_url, channel=channel)