Skip to content

Commit

Permalink
fixed?
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer committed Jul 22, 2024
1 parent 76266d5 commit 4790b76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/VahterBanBot.Tests/MLBanTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type MLBanTests(fixture: VahterTestContainers, _unused: MlAwaitFixture) =
let ``If message got auto-deleted we can mark it as false-positive with a button click`` () = task {
// record a message, where 2 is in a training set as spam word
// ChatsToMonitor[0] doesn't have stopwords
let msgUpdate = Tg.quickMsg(chat = fixture.ChatsToMonitor[0], text = "2")
let msgUpdate = Tg.quickMsg(chat = fixture.ChatsToMonitor[0], text = "7")
let! _ = fixture.SendMessage msgUpdate

// assert that the message got auto banned
Expand Down Expand Up @@ -105,7 +105,7 @@ type MLBanTests(fixture: VahterTestContainers, _unused: MlAwaitFixture) =
// send a callback to mark it as false-positive
// we are sending this as a usual user
let! callbackId = fixture.GetCallbackId msgUpdate.Message (nameof CallbackMessage.NotASpam)
let msgCallback = Tg.callback(string callbackId)
let msgCallback = Tg.callback(string callbackId, from = msgUpdate.Message.From)
let! _ = fixture.SendMessage msgCallback

// assert it is still NOT a false-positive
Expand Down
2 changes: 1 addition & 1 deletion src/VahterBanBot/DB.fs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ let getUserById (userId: int64): Task<DbUser option> =
use conn = new NpgsqlConnection(connString)

//language=postgresql
let sql = "SELECT * FROM \"user\" WHERE id = @userId"
let sql = """SELECT * FROM "user" WHERE id = @userId"""
let! users = conn.QueryAsync<DbUser>(sql, {| userId = userId |})
return users |> Seq.tryHead
}
Expand Down

0 comments on commit 4790b76

Please sign in to comment.