diff options
author | Julio Capote <jcapote@gmail.com> | 2022-12-31 02:20:02 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-12-31 02:20:02 +0000 |
commit | c500a2be38afcbb5688537d97c7c3ee30a57dba4 (patch) | |
tree | 79cf1884ca7529299646b567b7705378bdf08fd3 /registry/registry.go | |
parent | 74ffcfe6b2c80b7cf459798dc42bd278075ccb50 (diff) | |
download | communique-c500a2be38afcbb5688537d97c7c3ee30a57dba4.tar.gz |
parse and persist feeds from handlers
Diffstat (limited to '')
-rw-r--r-- | registry/registry.go | 10 |
1 files changed, 5 insertions, 5 deletions
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) } |