Browse Source

优化退出登录推送

peng 11 months ago
parent
commit
06007ef373
1 changed files with 6 additions and 3 deletions
  1. 6 3
      Controller/TransparentTransmissionPushController.py

+ 6 - 3
Controller/TransparentTransmissionPushController.py

@@ -46,9 +46,12 @@ class TransparentTransmissionPushView(View):
         if not all([push_token, user_id, app_bundle_id]):
             return response.json(444)
         try:
-            uid_push_qs = GatewayPush.objects.filter(user_id=user_id, app_bundle_id=app_bundle_id).exclude(
-                token_val=push_token).values('token_val', 'push_type', 'app_bundle_id',
-                                             'jg_token_val').distinct().order_by('token_val')
+            uid_push_qs = GatewayPush.objects.filter(user_id=user_id, app_bundle_id=app_bundle_id,
+                                                     logout=False).exclude(token_val=push_token).values('token_val',
+                                                                                                        'push_type',
+                                                                                                        'app_bundle_id',
+                                                                                                        'jg_token_val').distinct().order_by(
+                'token_val')
             if not uid_push_qs.exists():
                 return response.json(173)
             uid_push_list = list(uid_push_qs)