aboutsummaryrefslogtreecommitdiff
path: root/Follow.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-23 22:37:20 -0800
committerFChannel <=>2021-01-23 22:37:20 -0800
commit2ca021e2c6599b39e6225fdbd449093517a34418 (patch)
treede65bb297a63765f4e471ddd488975466e438df1 /Follow.go
parent000c206417a91d0f910cba35d16d433a1f038530 (diff)
caching progress
Diffstat (limited to 'Follow.go')
-rw-r--r--Follow.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/Follow.go b/Follow.go
index ca281ae..94469c2 100644
--- a/Follow.go
+++ b/Follow.go
@@ -200,9 +200,11 @@ func SetActorFollowingDB(db *sql.DB, activity Activity) Activity {
if alreadyFollow {
query = `delete from following where id=$1 and following=$2`
activity.Summary = activity.Object.Actor.Id + " Unfollowing " + activity.Actor.Id
+ DeleteActorCache(db, activity.Actor.Id)
} else {
query = `insert into following (id, following) values ($1, $2)`
activity.Summary = activity.Object.Actor.Id + " Following " + activity.Actor.Id
+ WriteActorToCache(db, activity.Actor.Id)
}
_, err := db.Exec(query, activity.Object.Actor.Id, activity.Actor.Id)