diff options
Diffstat (limited to 'registry/registry.go')
-rw-r--r-- | registry/registry.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/registry/registry.go b/registry/registry.go index aac21d4..2518d55 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -1,6 +1,8 @@ package registry import ( + "bytes" + "encoding/gob" "fmt" "git.capotej.com/capotej/communique/config" @@ -58,7 +60,18 @@ func (r *Registry) OutboxCollection(name string) (map[string]interface{}, error) if err != nil { return nil, err } - return views.RenderOutboxCollection(handler.handlerCfg.Name, r.cfg.Domain, page) + var outboxItems []models.OutboxItem + for _, v := range page { + buf := bytes.NewBuffer(v) + dec := gob.NewDecoder(buf) + var outboxItem models.OutboxItem + err = dec.Decode(&outboxItem) + if err != nil { + return nil, err + } + outboxItems = append(outboxItems, outboxItem) + } + return views.RenderOutboxCollection(handler.handlerCfg.Name, r.cfg.Domain, outboxItems) } func (r *Registry) WebfingerResource(fqn string) (*views.WebfingerResource, error) { |