diff --git a/app/Models/File.php b/app/Models/File.php index 4b48a184d..e46832a17 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -725,9 +725,9 @@ class File extends AbstractModel * @param int $permission * @return File */ - public static function permissionFind(int $id, $user, int $limit = 0, int &$permission = -1) + public static function permissionFind($id, $user, int $limit = 0, int &$permission = -1) { - $file = File::find($id); + $file = File::find(intval($id)); if (empty($file)) { throw new ApiException('文件不存在或已被删除'); } diff --git a/app/Models/UmengAlias.php b/app/Models/UmengAlias.php index 40df0e17c..5d0ea9a2c 100644 --- a/app/Models/UmengAlias.php +++ b/app/Models/UmengAlias.php @@ -193,7 +193,11 @@ class UmengAlias extends AbstractModel $lists = $rows->take(5)->groupBy('platform'); // 每个会员最多推送5个别名 foreach ($lists as $platform => $list) { $alias = $list->pluck('alias')->implode(','); - self::pushMsgToAlias($alias, $platform, $array); + try { + self::pushMsgToAlias($alias, $platform, $array); + } catch (\Exception $e) { + info("[PushMsg] fail: " . $e->getMessage()); + } } } }); diff --git a/app/Tasks/BotReceiveMsgTask.php b/app/Tasks/BotReceiveMsgTask.php index b512a7da7..8f71c5923 100644 --- a/app/Tasks/BotReceiveMsgTask.php +++ b/app/Tasks/BotReceiveMsgTask.php @@ -445,7 +445,7 @@ class BotReceiveMsgTask extends AbstractTask if ($replyMsg) { $replyCommand = $this->extractCommand($replyMsg); if ($replyCommand) { - $replyCommand = Base::cutStr($replyCommand, 200) . "\n\n ------------------ Reference above ------------------ \n\n"; + $replyCommand = "" . Base::cutStr($replyCommand, 2000) . "\n\nThe content within the above tags is a citation.\n\n"; } } $command = $replyCommand . $command;