Drop the mutation and sequential-await rules and the stale directives. [skip build]
Checks / checks (push) Successful in 2m6s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-02 00:09:28 +11:00
parent 48db806dd7
commit 45f38f2ac8
13 changed files with 9 additions and 28 deletions
-2
View File
@@ -396,10 +396,8 @@ export const rateLimitedActions = async <T, R = void>(
for (let i = 0; i < data.length; i += 1) {
const dataItem = data[i];
retryCount = 0;
// eslint-disable-next-line no-await-in-loop
await performAction(dataItem, i);
if (actionInterval > 0) {
// eslint-disable-next-line no-await-in-loop
await sleepForMs(actionInterval);
}
}
-5
View File
@@ -217,11 +217,9 @@ export async function importTelegramStickerPack(
try {
// Get file path from Telegram
// eslint-disable-next-line no-await-in-loop
const filePath = await getFilePath(botToken, sticker.file_id);
// Download the sticker
// eslint-disable-next-line no-await-in-loop
let blob = await downloadFile(botToken, filePath);
// Generate a shortcode from emoji or index
@@ -235,20 +233,17 @@ export async function importTelegramStickerPack(
// Convert animated stickers to GIF
if (isAnimated && filePath.endsWith('.tgs')) {
onProgress?.(i + 1, total, `Converting animated sticker ${i + 1}/${total} to GIF...`);
// eslint-disable-next-line no-await-in-loop
blob = await tgsToGif(blob, sticker.width, sticker.height);
finalMimeType = 'image/gif';
extension = 'gif';
} else if (isVideo && filePath.endsWith('.webm')) {
onProgress?.(i + 1, total, `Converting video sticker ${i + 1}/${total} to GIF...`);
// eslint-disable-next-line no-await-in-loop
blob = await webmToGif(blob, sticker.width, sticker.height);
finalMimeType = 'image/gif';
extension = 'gif';
}
// Upload to Matrix
// eslint-disable-next-line no-await-in-loop
const mxcUrl = await uploadToMatrix(mx, blob, `${shortcode}.${extension}`);
// Add to images