From 2ca021e2c6599b39e6225fdbd449093517a34418 Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Sat, 23 Jan 2021 22:37:20 -0800 Subject: caching progress --- Follow.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Follow.go') 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) -- cgit v1.2.3