From 2942a6818ec87111023c3e1e8a8114591f78089f Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 7 Jan 2019 14:35:47 -0500 Subject: [PATCH] Fix AP follower INSERT with SQLite Previously the query would fail with "no such function: NOW" Closes #56 --- activitypub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activitypub.go b/activitypub.go index 880aa9d..3b0ac82 100644 --- a/activitypub.go +++ b/activitypub.go @@ -408,7 +408,7 @@ func handleFetchCollectionInbox(app *app, w http.ResponseWriter, r *http.Request } // Add follow - _, err = t.Exec("INSERT INTO remotefollows (collection_id, remote_user_id, created) VALUES (?, ?, NOW())", c.ID, followerID) + _, err = t.Exec("INSERT INTO remotefollows (collection_id, remote_user_id, created) VALUES (?, ?, "+app.db.now()+")", c.ID, followerID) if err != nil { if mysqlErr, ok := err.(*mysql.MySQLError); ok { if mysqlErr.Number != mySQLErrDuplicateKey {