Clear session data before deleting key to ensure session is unusable
- Set session data to empty JSON ({}) before deleting the key - Ensures session is unusable even if deletion fails or there's replication lag - Add error handli...
Improve logout cookie clearing - clear cookies across all domain/path combinations
- Clear cookies with base domain (e.g., .kamocrm.com) to cover all subdomains - Clear cookies for current hostname without domain attribute - Clear cookies unre...
使用avatarType 字段而不是复杂的代理检测
- 直接检查 AvatarType 字段以进行简单的类型检查 - 创建新相机时设置相机Type - 更简单、更能发挥作用
查询所有用户的外观以获取真正的实体而不是代理
- 从avatar获取用户ID,然后查询找到ByUserId(返回真实实体) - 从列表中查找匹配的外观并检查实例 - 这避免了代理问题 阻止实例工作
使用简单的过滤器检查是否是相片或 Avatar 创建器
- 删除复杂的代理检测逻辑 - 简单的过滤器找到ById结果 检查是否是AvatarPhoto - 如果不是相片, 默认为 Avatar 创建者 - 简单得多
使用 Hibernate Lazy Initializer 来从代理获取实际实体类
- 进入HibernateProxy的懒惰化器,以获得持久的阶级 - 检查是否是AvatarPhoto 或 Avatar 创建者 - 使用QQ强制初始化 - 这应该正确识别Avatar类型 即使它是一个代理
使用直接投影来确定外观类型而不是反射
- 试铸给AvatarPhoto先强制代理初始化 - 直接在投影后访问获取FileExtension() - 回到阿凡达阿凡达 造物主的铸造,如果相片铸造失败 - 更好的类型检测错误处理
通过抓取调用目标来改进代理类型检测
- 在代理上援引方法确定实际类型时处理分类例外 - 尝试先获取FileExtension(相片),再获取Style(阿凡达创建器) - 更好的Hibernate代理类型检测错误处理
改进模拟类型检测的 Hibernate 代理处理
- 搜索等级和接口以获取FileExtension方法 - 使用反射来检测 AvatarPhoto 与 AvatarAvatar 创建者在失败时 - 在类名检查中添加倒数 - 解决将相片造型人错误地当作"神通造型人"的问题
从寄存器重新装入相机以解决 Hibernate 代理实例
- 从关系中装入的神通实体可能是未成功检查的Hibernate代理 - 从寄存器重新装入相机以获得实际实体类型(相机或相机) - 如果重新装入失败, 使用反射法添加倒置逻辑 - 修正“ 未知的可视化类型” 错误, 导致无效可视化 URL
为调试添加详细的日志到 avatar URL 生成
- 生成可视化的 URL 时日志, 创建什么 URL - 失传或URL无效时日志 - 这将有助于确定为何Avatars没有出现在聊天头/聊天箱/成员名单中
Determine active avatar by checking user.getAvatar() instead of RecordState
- Backend now correctly marks which avatar is active by comparing to user.getAvatar() - This ensures the isActive flag in the API response reflects the actual a...
Add avatar URLs to members by-department endpoint with override mechanism
- Include avatar URL in each member response from **************** - Respect override mechanism: member avatar (if exists) → user avatar (default) - Frontend ...
Handle ISO date format and improve avatarId type parsing
- Added support for ISO date format (YYYY-MM-DD) in addition to M/d/yyyy - Improved avatarId parsing to handle Number types (Double, BigDecimal, etc.) from JSON...
Add better error handling and logging for user/member save operations
- Added try-catch around user save operation with detailed error logging - Added try-catch around member save operation with detailed error logging - Improved d...
Improve avatarId parsing to handle string, integer, and long types
- Added support for parsing avatarId from String type - Better error handling for invalid avatarId formats - Added logging for avatar assignment and errors
Add detailed logging to updateMemberProfile for debugging
- Added logging at start of updateMemberProfile method - Added logging before and after saving user and member - Improved error response to include error detail...
Add support for updating user name fields and dateOfBirth in member profile
- Added UserRepository to MemberController - Updated updateMemberProfile to handle namePrefix, nameFirst, nameMiddle, nameLast, nameSuffix, nameFirstAKA, nameLa...
Store avatar hash and extension in *** session data
- Added updateSession method to KSessionService for updating session fields - Updated setActiveAvatar to store userAvatarHash and userAvatarExtension in session...
Include avatar URLs in member profile response
- Added helper methods to generate avatar URLs (getThemeDomain, getPublicBucketName, generateFileHash, getPublicBucketUrl, generateAvatarUrl) - Updated getMembe...
Add ThemeBackgroundController with hash-based storage and public bucket support
Use correct bucket and object path structure for MinIO uploads
- Change bucket name from domain-based to 'public' bucket - Include domain path (e.g., kamocrm-com) as part of object name, not bucket name - Fix object path st...
Properly handle MinIO upload failures for avatars
- Remove silent exception swallowing in Avatar Creator avatar creation - Add proper error handling and rollback for failed uploads - Delete database record if f...
Remove ID-based fallback code, use only hash-based naming
- Remove all try-catch fallback logic for missing fileHash column - Remove ID-based file naming fallbacks - Code now exclusively uses hash-based file storage - ...
Handle missing fileHash column gracefully
- Add try-catch around fileHash access to handle missing database column - Fall back to ID-based file naming if fileHash column doesn't exist yet - Allows code ...
Implement hash-based file storage for avatars
- Generate SHA-256 hash from avatar ID after persistence - Store hash in database fileHash field - Upload files to MinIO using hash-based naming: {hash}.{fileEx...