瀏覽代碼

Fix AP follower INSERT with SQLite

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

Closes #56
tags/v0.7.0
Matt Baer 5 年之前
父節點
當前提交
2942a6818e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      activitypub.go

+ 1
- 1
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 {


Loading…
取消
儲存