wip: add long message helpers and payload type controls

- add centralized message validation errors
- switch command handlers to return error
- add explicit long plain-text reply helpers
- support strict payload type policy with debug logging
- document versioning and changelog workflow
This commit is contained in:
2026-03-26 18:15:06 +03:00
parent 5d3199dc21
commit 945b8240e6
22 changed files with 631 additions and 77 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ func TestAutoGenerateCommandsChecksLimitBeforeDelete(t *testing.T) {
}()
plugin := NewPlugin[NoDB]("overflow")
exec := func(ctx *MsgContext, db NoDB) {}
exec := func(ctx *MsgContext, db NoDB) error { return nil }
for i := 0; i < 101; i++ {
plugin.AddCommand(NewCommand(exec, "cmd"+strconv.Itoa(i)))
}
@@ -66,7 +66,7 @@ func TestAutoGenerateCommandsChecksLimitBeforeDelete(t *testing.T) {
func TestGatherCommandsForPluginReturnsSortedCommands(t *testing.T) {
plugin := NewPlugin[NoDB]("sorted")
exec := func(ctx *MsgContext, db NoDB) {}
exec := func(ctx *MsgContext, db NoDB) error { return nil }
plugin.AddCommand(NewCommand(exec, "zeta"))
plugin.AddCommand(NewCommand(exec, "alpha"))