Browse Source

回调修改

lizhen_gitee 1 year ago
parent
commit
1acea85b26
1 changed files with 7 additions and 0 deletions
  1. 7 0
      application/api/controller/Tenim.php

+ 7 - 0
application/api/controller/Tenim.php

@@ -590,6 +590,13 @@ exit;
     public function callback() {
         $input = file_get_contents("php://input"); // 主题信息
         $input = json_decode($input,true);
+
+        $callback_data = [
+            'time' => date('Y-m-d H:i:s'),
+            'data' => $input,
+        ];
+        Db::name('callback')->insertGetId($callback_data);
+
         $CallbackCommand = $input["CallbackCommand"];
         switch ($CallbackCommand) {
             case 'State.StateChange': // 用户在线状态变更