修复:用户名单头像全显示默认的问题

- User::headface accessor 补充 setter,确保后台管理赋值时正确写入 usersf 字段
- changeAvatar() 修改头像后同步更新 Redis 在线用户列表
- ChatStateService 新增 getUserRooms() 方法,支持查找用户所在房间
This commit is contained in:
2026-02-26 21:49:37 +08:00
parent 5d722bbb0b
commit 2386948fde
3 changed files with 45 additions and 0 deletions
+1
View File
@@ -86,6 +86,7 @@ class User extends Authenticatable
{
return Attribute::make(
get: fn () => $this->usersf ?: '1.GIF',
set: fn (string $value) => ['usersf' => $value],
);
}