瀏覽代碼

no message

kuaifan 5 年之前
父節點
當前提交
b04b6fdfd3
共有 3 個文件被更改,包括 6 次插入5 次删除
  1. 1 1
      app/Services/WebSocketService.php
  2. 4 3
      app/Tasks/NotificationTask.php
  3. 1 1
      package.json

+ 1 - 1
app/Services/WebSocketService.php

@@ -259,7 +259,7 @@ class WebSocketService implements WebSocketHandlerInterface
                     Task::deliver($pushTask);
                     //
                     $notificationTask = new NotificationTask($resData['id']);
-                    $notificationTask->delay(10);
+                    $notificationTask->delay(8);
                     Task::deliver($notificationTask);
                 }
                 break;

+ 4 - 3
app/Tasks/NotificationTask.php

@@ -31,12 +31,13 @@ class NotificationTask extends Task
             return;
         }
         //
+        $username = $row['receive'];
         $message = Base::string2array($row['message']);
-        $lists = Base::DBC2A(DB::table('umeng')->where('username', $row['username'])->get());
+        $lists = Base::DBC2A(DB::table('umeng')->where('username', $username)->get());
         foreach ($lists AS $item) {
-            Umeng::notification($item['platform'], $item['token'], Users::nickname($row['username']), Chat::messageDesc($message), [
+            Umeng::notification($item['platform'], $item['token'], Users::nickname($username), Chat::messageDesc($message), [
                 'contentId' => $row['contentId'],
-                'username' => $row['username'],
+                'username' => $username,
             ]);
         }
     }

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-    "version": "1.4.13",
+    "version": "1.4.14",
     "name": "wookteam",
     "private": true,
     "scripts": {