diff --git a/queue/bytes/queue.go b/queue/bytes/queue.go index 11e80c0..f9ba234 100644 --- a/queue/bytes/queue.go +++ b/queue/bytes/queue.go @@ -30,10 +30,15 @@ type queue struct { func (q queue) Put(object []byte) error { return q.Enq(q.cat, object) } func (q queue) Enq(cat string, object []byte) error { + obj, err := q.codec.Encode(object) + if err != nil { + return err + } + ctx := swarm.NewContext(context.Background(), cat, "") - bag := swarm.Bag{Ctx: ctx, Object: object} + bag := swarm.Bag{Ctx: ctx, Object: obj} - err := q.emit.Enq(bag) + err = q.emit.Enq(bag) if err != nil { return err }