From bdc797d5c107136a1e7afec0244fcf2b109b2c0d Mon Sep 17 00:00:00 2001 From: "Felipe M." Date: Mon, 23 Jun 2025 11:34:27 +0200 Subject: [PATCH 1/4] chore: make format --- internal/platform/telegram/telegram.go | 2 +- internal/plugin/social/twitter_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/platform/telegram/telegram.go b/internal/platform/telegram/telegram.go index 07c65a9..d35bb6b 100644 --- a/internal/platform/telegram/telegram.go +++ b/internal/platform/telegram/telegram.go @@ -236,7 +236,7 @@ func (t *TelegramPlatform) SendMessage(msg *model.Message) error { "chat_id": chatID, "text": msg.Text, } - + // Set parse_mode based on plugin preference or default to Markdown if msg.Raw != nil && msg.Raw["parse_mode"] != nil { // Plugin explicitly set parse_mode diff --git a/internal/plugin/social/twitter_test.go b/internal/plugin/social/twitter_test.go index d94cad4..c0e1681 100644 --- a/internal/plugin/social/twitter_test.go +++ b/internal/plugin/social/twitter_test.go @@ -117,4 +117,4 @@ func TestTwitterExpander_OnMessage(t *testing.T) { } }) } -} \ No newline at end of file +} From 3a5b5c216ddc3c719c095bbf7bf40d80e344b391 Mon Sep 17 00:00:00 2001 From: "Felipe M." Date: Mon, 23 Jun 2025 11:35:30 +0200 Subject: [PATCH 2/4] chore: try to ensure that code is checked after each session --- CLAUDE.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0261dd2..cb4e70a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,10 +18,12 @@ When creating, modifying, or removing plugins: ## Testing -After every session that contains changes to files: +**CRITICAL**: After making ANY changes to code files, you MUST run these commands in order: -1. Check files are properly formatted running `make format` -2. Check code style and linting: Run `make lint` -3. Test the plugin functionality: Run `make test` +1. **Format code**: `make format` - Format all code according to project standards +2. **Lint code**: `make lint` - Check code style and quality (must show "0 issues") +3. **Run tests**: `make test` - Run all tests to ensure functionality works 4. Verify documentation accuracy 5. Ensure all examples work as described + +**These commands are MANDATORY after every code change, no exceptions.** From 60ceaffd82dd209877f38771e719fc426dfff725 Mon Sep 17 00:00:00 2001 From: "Felipe M." Date: Mon, 23 Jun 2025 11:43:42 +0200 Subject: [PATCH 3/4] fix: enable all plugins help text --- internal/admin/templates/channel_detail.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/admin/templates/channel_detail.html b/internal/admin/templates/channel_detail.html index 9f9a78d..7e12d57 100644 --- a/internal/admin/templates/channel_detail.html +++ b/internal/admin/templates/channel_detail.html @@ -32,7 +32,7 @@ Enable All Plugins -
+
When enabled, all registered plugins will be automatically enabled for this channel. Individual plugin settings will be ignored.
@@ -124,4 +124,4 @@ -{{end}} \ No newline at end of file +{{end}} From 377b1723c31975c9cb43587a949c2014e2ae81ae Mon Sep 17 00:00:00 2001 From: "Felipe M." Date: Tue, 24 Jun 2025 08:10:56 +0200 Subject: [PATCH 4/4] fix: default parse mode to text --- internal/platform/telegram/telegram.go | 6 +++--- internal/plugin/social/twitter.go | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/platform/telegram/telegram.go b/internal/platform/telegram/telegram.go index d35bb6b..b015793 100644 --- a/internal/platform/telegram/telegram.go +++ b/internal/platform/telegram/telegram.go @@ -237,13 +237,13 @@ func (t *TelegramPlatform) SendMessage(msg *model.Message) error { "text": msg.Text, } - // Set parse_mode based on plugin preference or default to Markdown + // Set parse_mode based on plugin preference or default to empty string if msg.Raw != nil && msg.Raw["parse_mode"] != nil { // Plugin explicitly set parse_mode payload["parse_mode"] = msg.Raw["parse_mode"] } else { - // Default to Markdown for backward compatibility - payload["parse_mode"] = "Markdown" + // Default to empty string (no formatting) + payload["parse_mode"] = "" } // Add reply if needed diff --git a/internal/plugin/social/twitter.go b/internal/plugin/social/twitter.go index 69bd979..f2c6cc9 100644 --- a/internal/plugin/social/twitter.go +++ b/internal/plugin/social/twitter.go @@ -75,7 +75,6 @@ func (p *TwitterExpander) OnMessage(msg *model.Message, config map[string]interf Chat: msg.Chat, ReplyTo: msg.ID, Channel: msg.Channel, - Raw: map[string]interface{}{"parse_mode": ""}, } action := &model.MessageAction{