From c500a2be38afcbb5688537d97c7c3ee30a57dba4 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Fri, 30 Dec 2022 21:20:02 -0500 Subject: parse and persist feeds from handlers --- registry/registry.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'registry/registry.go') diff --git a/registry/registry.go b/registry/registry.go index 8372d40..aac21d4 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -40,7 +40,7 @@ func (r *Registry) Outbox(name string) (map[string]interface{}, error) { if handler == nil { return nil, nil } - aso := models.NewActivityStreamsObject(nil, handler.handlerCfg) + aso := models.NewOutboxItem(handler.handlerCfg) totalItems, err := r.persister.Count(aso) if err != nil { return nil, err @@ -48,15 +48,15 @@ func (r *Registry) Outbox(name string) (map[string]interface{}, error) { return views.RenderOutbox(handler.handlerCfg.Name, r.cfg.Domain, totalItems) } -func (r *Registry) OutboxCollection(name string) (string, error) { +func (r *Registry) OutboxCollection(name string) (map[string]interface{}, error) { handler := r.findByName(name) if handler == nil { - return "", nil + return nil, nil } - aso := models.NewActivityStreamsObject(nil, handler.handlerCfg) + aso := models.NewOutboxItem(handler.handlerCfg) page, err := r.persister.Collect(aso) if err != nil { - return "", err + return nil, err } return views.RenderOutboxCollection(handler.handlerCfg.Name, r.cfg.Domain, page) } -- cgit v1.2.3