Message: Skip empty translations (#6731)

This commit is contained in:
zubiden 2026-02-27 19:51:22 +01:00 committed by Alexander Zinchuk
parent d7662901fa
commit 52da4643c1

View File

@ -71,8 +71,9 @@ export function updateMessageTranslations<T extends GlobalState>(
global: T, chatId: string, messageIds: number[], toLanguageCode: string, translations: ApiFormattedText[],
) {
messageIds.forEach((messageId, index) => {
const text = translations[index];
global = updateMessageTranslation(global, chatId, messageId, toLanguageCode, {
text: translations[index],
text: text.text.length ? text : undefined,
isPending: false,
});
});