Fix AP follower INSERT with SQLite

Previously the query would fail with "no such function: NOW"

Closes #56
This commit is contained in:
Matt Baer 2019-01-07 14:35:47 -05:00
parent 8a555567a6
commit 2942a6818e
1 changed files with 1 additions and 1 deletions

View File

@ -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 {