Browse Source

Fix 'AlbumFilename'

master
Eduard Kuzmenko 3 years ago
parent
commit
4301a0622c
  1. 15
      src/lib/appManagers/appMessagesManager.ts

15
src/lib/appManagers/appMessagesManager.ts

@ -2982,11 +2982,22 @@ export class AppMessagesManager {
} else if(document.type === 'round') { } else if(document.type === 'round') {
addPart('AttachRound'); addPart('AttachRound');
} else if(document.type === 'sticker') { } else if(document.type === 'sticker') {
const i = parts.length;
if(document.stickerEmojiRaw) { if(document.stickerEmojiRaw) {
addPart(undefined, (plain ? document.stickerEmojiRaw : document.stickerEmoji) + ' '); addPart(undefined, (plain ? document.stickerEmojiRaw : document.stickerEmoji) + ' ');
} }
addPart('AttachSticker'); addPart('AttachSticker');
// will combine two parts into one
const p = parts.splice(i, 2);
if(plain) parts.push((p[0] as string) + (p[1] as string));
else {
const span = window.document.createElement('span');
span.append(...p);
parts.push(span);
}
text = ''; text = '';
} else if(document.type === 'audio') { } else if(document.type === 'audio') {
const attribute = document.attributes.find(attribute => attribute._ === 'documentAttributeAudio' && (attribute.title || attribute.performer)) as DocumentAttribute.documentAttributeAudio; const attribute = document.attributes.find(attribute => attribute._ === 'documentAttributeAudio' && (attribute.title || attribute.performer)) as DocumentAttribute.documentAttributeAudio;
@ -3012,9 +3023,9 @@ export class AppMessagesManager {
} }
const length = parts.length; const length = parts.length;
/* for(let i = 1; i < length; i += 2) { for(let i = 1; i < length; i += 2) {
parts.splice(i, 0, ', '); parts.splice(i, 0, ', ');
} */ }
if(text && length) { if(text && length) {
parts.push(', '); parts.push(', ');

Loading…
Cancel
Save