aboutsummaryrefslogtreecommitdiff
path: root/Database.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 12:31:44 -0800
committerFChannel <=>2021-01-28 12:31:44 -0800
commitee3c47a5b2251380ded1239b149fd1f6e6514bfb (patch)
tree4464e74060f84e47ef19a8449cdce02f4307ee0f /Database.go
parentfaee9db270a22a42e45210529c7998dcede0087b (diff)
dont write to cache if local actor
Diffstat (limited to 'Database.go')
-rw-r--r--Database.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/Database.go b/Database.go
index aac87c7..4f29026 100644
--- a/Database.go
+++ b/Database.go
@@ -389,13 +389,13 @@ func GetActivityFromDB(db *sql.DB, id string) Collection {
return nColl
}
-func GetObjectFromDB(db *sql.DB, actor Actor) Collection {
+func GetObjectFromDB(db *sql.DB, id string) Collection {
var nColl Collection
var result []ObjectBase
query := `select id, name, content, type, published, updated, attributedto, attachment, preview, actor from activitystream where actor=$1 and id in (select id from replies where inreplyto='') and type='Note' order by updated asc`
- rows, err := db.Query(query, actor.Id)
+ rows, err := db.Query(query, id)
CheckError(err, "error query object from db")