Compare commits

..

No commits in common. "master" and "v0.8.2" have entirely different histories.

5 changed files with 12 additions and 13 deletions

View file

@ -18,12 +18,10 @@ When creating, modifying, or removing plugins:
## Testing ## Testing
**CRITICAL**: After making ANY changes to code files, you MUST run these commands in order: After every session that contains changes to files:
1. **Format code**: `make format` - Format all code according to project standards 1. Check files are properly formatted running `make format`
2. **Lint code**: `make lint` - Check code style and quality (must show "0 issues") 2. Check code style and linting: Run `make lint`
3. **Run tests**: `make test` - Run all tests to ensure functionality works 3. Test the plugin functionality: Run `make test`
4. Verify documentation accuracy 4. Verify documentation accuracy
5. Ensure all examples work as described 5. Ensure all examples work as described
**These commands are MANDATORY after every code change, no exceptions.**

View file

@ -32,7 +32,7 @@
<input class="form-check-input" type="checkbox" name="enable_all_plugins" value="true" {{if .Channel.EnableAllPlugins}}checked{{end}}> <input class="form-check-input" type="checkbox" name="enable_all_plugins" value="true" {{if .Channel.EnableAllPlugins}}checked{{end}}>
<span class="form-check-label">Enable All Plugins</span> <span class="form-check-label">Enable All Plugins</span>
</label> </label>
<div> <div class="form-help">
When enabled, all registered plugins will be automatically enabled for this channel. Individual plugin settings will be ignored. When enabled, all registered plugins will be automatically enabled for this channel. Individual plugin settings will be ignored.
</div> </div>
</div> </div>
@ -124,4 +124,4 @@
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}

View file

@ -236,14 +236,14 @@ func (t *TelegramPlatform) SendMessage(msg *model.Message) error {
"chat_id": chatID, "chat_id": chatID,
"text": msg.Text, "text": msg.Text,
} }
// Set parse_mode based on plugin preference or default to empty string // Set parse_mode based on plugin preference or default to Markdown
if msg.Raw != nil && msg.Raw["parse_mode"] != nil { if msg.Raw != nil && msg.Raw["parse_mode"] != nil {
// Plugin explicitly set parse_mode // Plugin explicitly set parse_mode
payload["parse_mode"] = msg.Raw["parse_mode"] payload["parse_mode"] = msg.Raw["parse_mode"]
} else { } else {
// Default to empty string (no formatting) // Default to Markdown for backward compatibility
payload["parse_mode"] = "" payload["parse_mode"] = "Markdown"
} }
// Add reply if needed // Add reply if needed

View file

@ -75,6 +75,7 @@ func (p *TwitterExpander) OnMessage(msg *model.Message, config map[string]interf
Chat: msg.Chat, Chat: msg.Chat,
ReplyTo: msg.ID, ReplyTo: msg.ID,
Channel: msg.Channel, Channel: msg.Channel,
Raw: map[string]interface{}{"parse_mode": ""},
} }
action := &model.MessageAction{ action := &model.MessageAction{

View file

@ -117,4 +117,4 @@ func TestTwitterExpander_OnMessage(t *testing.T) {
} }
}) })
} }
} }