From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gnuweeb.org (Postfix) with ESMTPSA id 3FEF181892 for ; Tue, 20 Dec 2022 00:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671496168; bh=sUpoUlMu2j51dS505XqlQEhSrn8yrY6O4zcMyDlJZW0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JMl14K2HAWbS+56MkljqnWwcLjqv3pAMfUdLNBObdAg8IM8NUXdU/qu1YWf7YlKoK sse2GYu1wZH/SSer6qCCex3j651ky7Jf7gOvOWB3iLRFeySXQ3xYd8jh4TCCSZox2O sfZrdqL1R7zaW1tN/V7yNnpjLPO3mBlctebTlP2J0l+3WDi4ZP8iEG37TBO/qANPHQ B3ThogZhr9ilicV7f9+0gc9rVffbtVEkbvA1F9wk2oknAsX9o005uiyEMRr8Gz9z/P n0PRBCkZJIFfN3T5pq8X6tlsPh7O0D8oQD65lAaQqdj2KlUcPWhqSyDf0YUQXMhoNP +YvdmEwgnsXpQ== Received: by mail-lf1-f46.google.com with SMTP id f34so1023275lfv.10 for ; Mon, 19 Dec 2022 16:29:28 -0800 (PST) X-Gm-Message-State: ANoB5plWHQBebCvHkl6ohLiyyFLsXf4fGJYp2IO3Z7uEfYTZtikulPHy Z8yBuzQW/zf3PYcl3sE9XPOZvwGPKQzZFZQ0kDk= X-Google-Smtp-Source: AA0mqf7JGkmWIqwLb7X6CYFcK35NKWI6fwpMQqUO4vuOh86MeW2zpmQ6fg2YjJR3TfzbBJIrXBCPCoF38Z8YEaFB6TE= X-Received: by 2002:a05:6512:234c:b0:4b5:b2b1:69a4 with SMTP id p12-20020a056512234c00b004b5b2b169a4mr4485998lfu.165.1671496166427; Mon, 19 Dec 2022 16:29:26 -0800 (PST) MIME-Version: 1.0 References: <20221219235721.126-1-kiizuha@gnuweeb.org> <20221219235721.126-4-kiizuha@gnuweeb.org> In-Reply-To: <20221219235721.126-4-kiizuha@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Tue, 20 Dec 2022 07:29:15 +0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 03/17] fix: utils: add a substr for the patch media caption To: Muhammad Rizki Cc: Ammar Faizi , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" List-Id: On Tue, Dec 20, 2022 at 6:57 AM Muhammad Rizki wrote: > Add a substr caption for the patch email to avoid media caption too > long. > > Regarding this commit bb8855bf5e, it's forget to add a substr caption > method, which is it will get media caption too long error for both > Discord and Telegram bot. > > Signed-off-by: Muhammad Rizki What about changing the commit message to be something like this? Commit bb8855bf5e3 ("Fix the storage management after the refactor was happened") did not care with the caption length when sending an attachment. This leads to error when the caption length hits the limit. Add a substr() call to cut the caption if it's too long to avoid such an error. P.S.: at the "was happened" part.