aboutsummaryrefslogtreecommitdiff
path: root/activitypub
diff options
context:
space:
mode:
authorFChannel <>2022-07-16 09:49:54 -0700
committerFChannel <>2022-07-16 11:13:28 -0700
commit3a7664d404bca40cb3234924fa969c0ae133d085 (patch)
tree2468e548c760f52274178cdf0f6a0d3923f59b65 /activitypub
parenta22b213ddef7e86ef49366ffd6351adf0d28fcbe (diff)
fixed replies to post not showing up when following other boardsv0.1.1
added content length changes to alter database
Diffstat (limited to 'activitypub')
-rw-r--r--activitypub/object.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/activitypub/object.go b/activitypub/object.go
index f01d97d..5b78689 100644
--- a/activitypub/object.go
+++ b/activitypub/object.go
@@ -1277,7 +1277,7 @@ func (obj ObjectBase) WriteReply() error {
}
if update {
- if err := e.WriteUpdate(); err != nil {
+ if err := e.WriteUpdate(obj.Published); err != nil {
return util.MakeError(err, "WriteReply")
}
}
@@ -1321,21 +1321,21 @@ func (obj ObjectBase) WriteCache() (ObjectBase, error) {
if obj.Replies.OrderedItems != nil {
for _, e := range obj.Replies.OrderedItems {
- e._WriteCache()
+ e.WriteCache()
}
}
return obj, nil
}
-func (obj ObjectBase) WriteUpdate() error {
+func (obj ObjectBase) WriteUpdate(updated time.Time) error {
query := `update activitystream set updated=$1 where id=$2`
- if _, err := config.DB.Exec(query, time.Now().UTC().Format(time.RFC3339), obj.Id); err != nil {
+ if _, err := config.DB.Exec(query, updated, obj.Id); err != nil {
return util.MakeError(err, "WriteUpdate")
}
query = `update cacheactivitystream set updated=$1 where id=$2`
- _, err := config.DB.Exec(query, time.Now().UTC().Format(time.RFC3339), obj.Id)
+ _, err := config.DB.Exec(query, updated, obj.Id)
return util.MakeError(err, "WriteUpdate")
}