aboutsummaryrefslogtreecommitdiff
path: root/CacheDatabase.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-25 11:02:42 -0800
committerFChannel <=>2021-01-25 11:02:42 -0800
commit3b923a6f098cacf35f309e44a4c67a6a576fba4e (patch)
tree967d50793a086b9b08d25a83f64f29089d1fcf6c /CacheDatabase.go
parentf6ccb7e03ff6aff01acd7f2b40346156e7b8b10b (diff)
follow cache sync
Diffstat (limited to 'CacheDatabase.go')
-rw-r--r--CacheDatabase.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/CacheDatabase.go b/CacheDatabase.go
index 992a160..9de9c78 100644
--- a/CacheDatabase.go
+++ b/CacheDatabase.go
@@ -20,7 +20,13 @@ func WriteObjectToCache(db *sql.DB, obj ObjectBase) ObjectBase {
WriteActivitytoCache(db, obj)
}
- writeObjectReplyToDB(db, obj)
+ writeObjectReplyToDB(db, obj)
+
+ if obj.Replies != nil {
+ for _, e := range obj.Replies.OrderedItems {
+ WriteObjectToCache(db, e)
+ }
+ }
return obj
}
@@ -608,8 +614,8 @@ func DeleteActorCache(db *sql.DB, actorID string) {
}
func WriteActorToCache(db *sql.DB, actorID string) {
- actor := GetActor(actorID)
- collection := GetActorCollection(actor.Outbox)
+ actor := GetActor(actorID)
+ collection := GetActorCollection(actor.Outbox)
for _, e := range collection.OrderedItems {
WriteObjectToCache(db, e)