Fixing the video-to-file conversion error and audio appearance changes.
This commit is contained in:
@@ -450,9 +450,16 @@ export class ConversationsService {
|
||||
} else if (lastType === 'video') {
|
||||
preview = 'ویدیو';
|
||||
} else if (lastType === 'file' || lastType === 'document' || lastType === 'attachment') {
|
||||
preview = /\.(mp4|webm|mov|m4v|mkv|avi|3gp)(?:\?|$)/i.test(preview)
|
||||
? 'ویدیو'
|
||||
: 'فایل';
|
||||
if (/\.(mp4|mov|m4v|mkv|avi|3gp)(?:\?|$)/i.test(preview)) {
|
||||
preview = 'ویدیو';
|
||||
} else if (
|
||||
/(?:^|[\\/._-])voice(?:[\\/._-]|$)/i.test(preview) ||
|
||||
/\.(webm|ogg|mp3|m4a|wav|aac|opus)(?:\?|$)/i.test(preview)
|
||||
) {
|
||||
preview = 'پیام صوتی';
|
||||
} else {
|
||||
preview = 'فایل';
|
||||
}
|
||||
}
|
||||
const lastAtRaw =
|
||||
lastMsg?.created_at ?? lastMsg?.createdAt ?? row.updated_at ?? row.updatedAt ?? null;
|
||||
|
||||
Reference in New Issue
Block a user