diff options
author | Julio Capote <jcapote@gmail.com> | 2022-12-30 03:32:16 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2022-12-30 03:32:16 +0000 |
commit | 74ffcfe6b2c80b7cf459798dc42bd278075ccb50 (patch) | |
tree | 231880fb4de3cf900d03c33531d2afc9603432d3 /cgi | |
parent | a4288b06bf13210721c8f2fae64bc12c118f9041 (diff) | |
download | communique-74ffcfe6b2c80b7cf459798dc42bd278075ccb50.tar.gz |
experiment with write JSON to database and munge it for collections
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/servers.go | 6 |
1 files changed, 4 insertions, 2 deletions
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 { |