mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
move func PartStructure from webhook to queue, so it isn't tracked anymore for apidiff changes
the types in webhook should be subjected to apidiff'ing, this was a shared function. it is better off in package queue. also change the apidiff script so it leaves apidiff/next.txt empty when there aren't any changes. makes it easier to rotate the files after releases where nothing changed (a common occurrence).
This commit is contained in:
@ -44,7 +44,6 @@ import (
|
||||
"github.com/mjl-/mox/store"
|
||||
"github.com/mjl-/mox/webapi"
|
||||
"github.com/mjl-/mox/webauth"
|
||||
"github.com/mjl-/mox/webhook"
|
||||
"github.com/mjl-/mox/webops"
|
||||
)
|
||||
|
||||
@ -1263,7 +1262,7 @@ func (s server) MessageGet(ctx context.Context, req webapi.MessageGetRequest) (r
|
||||
MailboxName: mb.Name,
|
||||
}
|
||||
|
||||
structure, err := webhook.PartStructure(log, &p)
|
||||
structure, err := queue.PartStructure(log, &p)
|
||||
xcheckf(err, "parsing structure")
|
||||
|
||||
result := webapi.MessageGetResult{
|
||||
|
@ -25,7 +25,6 @@ import (
|
||||
"github.com/mjl-/mox/queue"
|
||||
"github.com/mjl-/mox/store"
|
||||
"github.com/mjl-/mox/webapi"
|
||||
"github.com/mjl-/mox/webhook"
|
||||
)
|
||||
|
||||
var ctxbg = context.Background()
|
||||
@ -418,7 +417,7 @@ func TestServer(t *testing.T) {
|
||||
tcheckf(t, err, "reading raw message")
|
||||
part, err := message.EnsurePart(log.Logger, true, bytes.NewReader(b.Bytes()), int64(b.Len()))
|
||||
tcheckf(t, err, "parsing raw message")
|
||||
structure, err := webhook.PartStructure(log, &part)
|
||||
structure, err := queue.PartStructure(log, &part)
|
||||
tcheckf(t, err, "part structure")
|
||||
tcompare(t, structure, msgRes.Structure)
|
||||
|
||||
|
Reference in New Issue
Block a user