소스 검색

修改华为推送channel_id

locky 1 년 전
부모
커밋
596c3d83ab
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      Service/HuaweiPushService/HuaweiPushService.py

+ 3 - 1
Service/HuaweiPushService/HuaweiPushService.py

@@ -149,9 +149,11 @@ class HuaweiPushObject:
         if int(event_type) in [606, 607]:
             sound = '/raw/phone_call'
             default_sound = False
+            channel_id = '111934'
         else:
             sound = '/raw/shake'
             default_sound = True
+            channel_id = '1'
         return messaging.AndroidNotification(
             icon='/raw/ic_launcher2',
             color='#AACCDD',
@@ -165,7 +167,7 @@ class HuaweiPushObject:
             body_loc_args=('boy', 'dog'),
             title_loc_key='M.String.title',
             title_loc_args=['Girl', 'Cat'],
-            channel_id='1',
+            channel_id=channel_id,
             notify_summary='',
             multi_lang_key={'title_key': {'en': 'value1'}, 'body_key': {'en': 'value2'}},
             style=1,