1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 01:57:02 +00:00

lua: bind BeforeMessageStored function (#418)

* lua: Restore missing test log output
* lua: Use logger for test assert_async output
* lua: add InboundMessage bindings
* lua: bind BeforeMessageStored function

---------

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-11-06 18:10:02 -08:00
committed by GitHub
parent 01fb161df8
commit 4a6b727cbc
7 changed files with 355 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/cjoudrey/gluahttp"
"github.com/cosmotek/loguago"
"github.com/inbucket/gopher-json"
json "github.com/inbucket/gopher-json"
"github.com/rs/zerolog"
lua "github.com/yuin/gopher-lua"
)
@@ -44,9 +44,10 @@ func (lp *statePool) newState() (*lua.LState, error) {
}
// Register custom types.
registerInboundMessageType(ls)
registerInbucketTypes(ls)
registerMessageMetadataType(ls)
registerMailAddressType(ls)
registerMessageMetadataType(ls)
registerPolicyType(ls)
// Run compiled script.