From 74ffcfe6b2c80b7cf459798dc42bd278075ccb50 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Thu, 29 Dec 2022 22:32:16 -0500 Subject: experiment with write JSON to database and munge it for collections --- cgi/servers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cgi/servers.go') diff --git a/cgi/servers.go b/cgi/servers.go index 229bca2..f5652ed 100644 --- a/cgi/servers.go +++ b/cgi/servers.go @@ -104,10 +104,12 @@ func processTick(h config.Handler, output []byte, persister *models.Persister, l orderedProp := coll.GetActivityStreamsOrderedItems() for iter := orderedProp.Begin(); iter != orderedProp.End(); iter = iter.Next() { contentType := iter.GetType().GetTypeName() - log.Debugf("found object type %s in activity stream", contentType) - contentNote := iter.GetActivityStreamsNote() // TODO make this configurable since it cant be dynamic + jsonMap, _ := streams.Serialize(contentNote) + jsonIter, _ := json.Marshal(jsonMap) + log.Debugf("found object %s of type %s in activity stream", jsonIter, contentType) + localNote := models.NewActivityStreamsObject(contentNote, h) err = persister.Store(localNote) if err != nil { -- cgit v1.2.3