Update mood handling in FalukantService and enhance Socket.io configuration in store

- Modified mood assignment in FalukantService to conditionally wrap mood data in an object based on moodId presence, improving data structure consistency.
- Refactored Socket.io initialization in the store to dynamically set the secure option based on the URL scheme, enhancing connection security in production environments.
This commit is contained in:
Torsten Schulz (local)
2026-01-14 16:22:05 +01:00
parent 02d24eccd8
commit e852346b94
3 changed files with 64 additions and 4 deletions

View File

@@ -3035,7 +3035,7 @@ class FalukantService extends BaseService {
gender: char2.gender,
firstName: firstNameMap.get(char2.firstName) || 'Unknown',
nobleTitle: titleMap.get(char2.titleOfNobility) || '',
mood: moodMap.get(char2.moodId) || null,
mood: char2.moodId ? { tr: moodMap.get(char2.moodId) || null } : null,
moodId: char2.moodId,
traits: traitsMap.get(char2.id) || []
} : null,