aboutsummaryrefslogtreecommitdiff
path: root/registry/registry.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-12-31 02:20:02 +0000
committerJulio Capote <jcapote@gmail.com>2022-12-31 02:20:02 +0000
commitc500a2be38afcbb5688537d97c7c3ee30a57dba4 (patch)
tree79cf1884ca7529299646b567b7705378bdf08fd3 /registry/registry.go
parent74ffcfe6b2c80b7cf459798dc42bd278075ccb50 (diff)
downloadcommunique-c500a2be38afcbb5688537d97c7c3ee30a57dba4.tar.gz
parse and persist feeds from handlers
Diffstat (limited to 'registry/registry.go')
-rw-r--r--registry/registry.go10
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)
}