Unify chat timestamps format (#4806)
* Unify chat timestamps format * Handle ISO timestamps in stats.js * Refactor timestamp parsing on server * Switch to ISO timestamps for character/messages creation dates * Fix type error * Early exist in saveGroupChat if group not found * Remove redundant fields from temp.chat export header * Auto-fix char creation date format on edit * Add name to fallback chat file names * Rename parseTimestamp server side function
This commit is contained in:
@@ -2865,7 +2865,7 @@ function getCharacterAvatarUrl() {
|
||||
if (context.groupId) {
|
||||
const groupMembers = context.groups.find(x => x.id === context.groupId)?.members;
|
||||
const lastMessageAvatar = context.chat?.filter(x => !x.is_system && !x.is_user)?.slice(-1)[0]?.original_avatar;
|
||||
const randomMemberAvatar = Array.isArray(groupMembers) ? groupMembers[Math.floor(Math.random() * groupMembers.length)]?.avatar : null;
|
||||
const randomMemberAvatar = Array.isArray(groupMembers) ? groupMembers[Math.floor(Math.random() * groupMembers.length)] : null;
|
||||
const avatarToUse = lastMessageAvatar || randomMemberAvatar;
|
||||
return formatCharacterAvatar(avatarToUse);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user