fix: 修复机器人发送消息接口

This commit is contained in:
kuaifan
2025-07-16 23:14:45 +08:00
parent cc96fcd6a0
commit ef67dc144f
2 changed files with 16 additions and 5 deletions

View File

@@ -753,11 +753,11 @@ class User extends AbstractModel
}
}
if ($update) {
$botUser->updateInstance($update);
if (isset($update['nickname'])) {
if (isset($update['nickname']) && $botUser->nickname != $update['nickname']) {
$botUser->az = Base::getFirstCharter($botUser->nickname);
$botUser->pinyin = Base::cn2pinyin($botUser->nickname);
}
$botUser->updateInstance($update);
$botUser->save();
}
return $botUser;