diff --git a/bug/operation.go b/bug/operation.go index b36103815233777373ccc7454a0d3c62a2bc188b..2e86921a63db6fc27e53414df33ca6ca717296cd 100644 --- a/bug/operation.go +++ b/bug/operation.go @@ -71,7 +71,7 @@ func idOperation(op Operation, base *OpBase) entity.Id { return base.id } -func operationUnmarshaller(author identity.Interface, raw json.RawMessage) (dag.Operation, error) { +func operationUnmarshaller(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (dag.Operation, error) { var t struct { OperationType OperationType `json:"type"` } diff --git a/entity/dag/common_test.go b/entity/dag/common_test.go index 25289b764b38943b55e3efe2d89c489ba3247a35..532e3ff8fe1a6c88f7d851a2d83ed7dce6dfb034 100644 --- a/entity/dag/common_test.go +++ b/entity/dag/common_test.go @@ -67,7 +67,7 @@ func (o *op2) Author() identity.Interface { return o.author } -func unmarshaler(author identity.Interface, raw json.RawMessage) (Operation, error) { +func unmarshaler(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (Operation, error) { var t struct { OperationType int `json:"type"` } diff --git a/entity/dag/entity.go b/entity/dag/entity.go index ffdbe33528fd29a673c02c0fa4c393060ccdddb3..0760cdec8064b9cdf4986efbaf0dbdf2142ad03c 100644 --- a/entity/dag/entity.go +++ b/entity/dag/entity.go @@ -26,7 +26,7 @@ type Definition struct { // the Namespace in git references (bugs, prs, ...) Namespace string // a function decoding a JSON message into an Operation - OperationUnmarshaler func(author identity.Interface, raw json.RawMessage) (Operation, error) + OperationUnmarshaler func(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (Operation, error) // the expected format version number, that can be used for data migration/upgrade FormatVersion uint } diff --git a/entity/dag/operation_pack.go b/entity/dag/operation_pack.go index d825281bfc19f00da8b98cd66f626c34179deb96..8ca2ff56ebceb8103bfec276e75b85dd868b5a14 100644 --- a/entity/dag/operation_pack.go +++ b/entity/dag/operation_pack.go @@ -314,7 +314,7 @@ func unmarshallPack(def Definition, resolver identity.Resolver, data []byte) ([] for _, raw := range aux.Operations { // delegate to specialized unmarshal function - op, err := def.OperationUnmarshaler(author, raw) + op, err := def.OperationUnmarshaler(author, raw, resolver) if err != nil { return nil, nil, err }