diff options
author | FChannel <> | 2021-05-13 23:47:42 -0700 |
---|---|---|
committer | FChannel <> | 2021-05-13 23:47:42 -0700 |
commit | fbd5e54c952663d0f0fab352d37d3baeefdb2e53 (patch) | |
tree | 938214b4cd24f4a5340ab05d5e349e34e503eb1f /CacheDatabase.go | |
parent | 20d0aee3f0bf987eb7e8999977bb25577df7b2d3 (diff) |
improved tripcodes
Diffstat (limited to 'CacheDatabase.go')
-rw-r--r-- | CacheDatabase.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CacheDatabase.go b/CacheDatabase.go index ec3c409..2761237 100644 --- a/CacheDatabase.go +++ b/CacheDatabase.go @@ -63,9 +63,9 @@ func WriteActivitytoCache(db *sql.DB, obj ObjectBase) { return } - query = `insert into cacheactivitystream (id, type, name, content, published, updated, attributedto, actor) values ($1, $2, $3, $4, $5, $6, $7, $8)` + query = `insert into cacheactivitystream (id, type, name, content, published, updated, attributedto, actor, tripcode) values ($1, $2, $3, $4, $5, $6, $7, $8, $9)` - _, e := db.Exec(query, obj.Id ,obj.Type, obj.Name, obj.Content, obj.Published, obj.Published, obj.AttributedTo, obj.Actor.Id) + _, e := db.Exec(query, obj.Id ,obj.Type, obj.Name, obj.Content, obj.Published, obj.Published, obj.AttributedTo, obj.Actor.Id, obj.TripCode) if e != nil{ fmt.Println("error inserting new activity cache") @@ -94,9 +94,9 @@ func WriteActivitytoCacheWithAttachment(db *sql.DB, obj ObjectBase, attachment O return } - query = `insert into cacheactivitystream (id, type, name, content, attachment, preview, published, updated, attributedto, actor) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)` + query = `insert into cacheactivitystream (id, type, name, content, attachment, preview, published, updated, attributedto, actor, tripcode) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)` - _, e := db.Exec(query, obj.Id ,obj.Type, obj.Name, obj.Content, attachment.Id, preview.Id, obj.Published, obj.Published, obj.AttributedTo, obj.Actor.Id) + _, e := db.Exec(query, obj.Id ,obj.Type, obj.Name, obj.Content, attachment.Id, preview.Id, obj.Published, obj.Published, obj.AttributedTo, obj.Actor.Id, obj.TripCode) if e != nil{ fmt.Println("error inserting new activity with attachment cache") @@ -299,7 +299,7 @@ func TombstoneObjectFromCache(db *sql.DB, id string) { datetime := time.Now().Format(time.RFC3339) - query := `update cacheactivitystream set type='Tombstone', name='', content='', attributedto='deleted', updated=$1, deleted=$2 where id=$3` + query := `update cacheactivitystream set type='Tombstone', name='', content='', attributedto='deleted', tripcode='', updated=$1, deleted=$2 where id=$3` _, err := db.Exec(query, datetime, datetime, id) |