From: Yonle <yonle@gnuweeb.org>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: Re: [GIT PULL] go-wrsbmkg-telegram: MSG_MEMORY_DIR feature
Date: Sun, 13 Jul 2025 17:58:27 +0700 [thread overview]
Message-ID: <5b6b7eb4-8dfc-4c39-a87a-00492b0c13c2@gnuweeb.org> (raw)
In-Reply-To: <aHOLmDZ/AV6mhE8a@biznet-home.integral.gnuweeb.org>
Greetings.
Your requested change has been merged to the master branch.
-
https://codeberg.org/Yonle/go-wrsbmkg-telegram/commit/47b93229fc11f451bf4494dea753a05b8f6c67f1
-
https://codeberg.org/Yonle/go-wrsbmkg-telegram/commit/da3a22ff4ac57f974ee84d985b009456a3672dac
-
https://codeberg.org/Yonle/go-wrsbmkg-telegram/commit/1fb468818593276a317821bc7c090cf523687931
Thank you!
---
Yonle
https://gnuweeb.org
On 7/13/25 17:34, Ammar Faizi wrote:
> Introducing a feature to remember sent messages in the Telegram bot.
>
> Designed to prevent the bot from resending messages that have already
> been sent. It utilizes a simple file-based memory system to keep track
> of sent messages. The bot hashes each message and checks if a file
> with that hash exists in a specified memory directory. If the file
> exists, the bot skips sending that message. If it does not exist, the
> bot creates the file to remember the message.
>
> There are three main changes in this pull request:
>
> 1) config: Introduce `MSG_MEMORY_DIR` field
> A preparation patch to introduce a feature to remember sent messages.
> It is used to avoid resending messages that have already been sent.
>
> 2) wrs: Introduce `IsNewMessage()` function.
>
> 3) wrs: Introduce `MemDirHouseKeeping()` function.
> To avoid blowing up the disk space, introduce `MemDirHouseKeeping()` to
> delete saved hashed messages older than 7 days.
>
> Consider pulling this feature.
>
> The following changes since commit 2a0832d3e534143b761654956a3572498f32078e:
>
> my bad for returning in a loop than continuing (2025-07-13 15:40:22 +0700)
>
> are available in the Git repository at:
>
> https://github.com/ammarfaizi2/go-wrsbmkg-tg.git tags/memmsg-2025-07-13
>
> for you to fetch changes up to 1fb468818593276a317821bc7c090cf523687931:
>
> wrs: Introduce `MemDirHouseKeeping()` function (2025-07-13 17:21:32 +0700)
>
> ----------------------------------------------------------------
> memmsg-2025-07-13
>
> ----------------------------------------------------------------
> Ammar Faizi (3):
> config: Introduce `MSG_MEMORY_DIR` field
> wrs: Introduce `IsNewMessage()` function
> wrs: Introduce `MemDirHouseKeeping()` function
>
> config.go | 4 +-
> wrs.go | 108 ++++++++++++++++++++++++++++++++++++++++
> wrsbmkg_telegrambot_config.yaml.example | 8 +++
> 3 files changed, 119 insertions(+), 1 deletion(-)
>
prev parent reply other threads:[~2025-07-13 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 10:34 [GIT PULL] go-wrsbmkg-telegram: MSG_MEMORY_DIR feature Ammar Faizi
2025-07-13 10:58 ` Yonle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b6b7eb4-8dfc-4c39-a87a-00492b0c13c2@gnuweeb.org \
--to=yonle@gnuweeb.org \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox