UpdateUserRecord wrote every column of the user it was given, so saving
a copy taken before a ban (cached user, stored inline object, invoice
event) lifted the ban. The banned flag and the admin key now always come
from the database row and are left out of the save; only the new
UpdateUserBan changes them, and the admin API uses it.
Manual port of kravens/BitTipBot 05c0a4e and dfc8d13.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* print debug stack on empty annon id update
* write stack to file
* use AnnonID
* set ids
* comments
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* send input
* remove message limiter
* write invoice into tx db
* do not delete tip twice
* hide link after 60 sedondw
* refactor button text update
* remove print
* translations enter user
* add tr
* no error on invalid user input
* printing fix
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* adding users cache in memory
* adding users cache in memory
* adding eko/gocache and removing CopyLowercaseUser
* using UpdateUserRecord
* updateCachedUser in user states
* remove redundant updatePersistentUser
* refactor
* remove cachedUser
* remove user chan
* errors for failed invoice creation
* errors for failed invoice and failed pay
* add GetUserBalanceCached inline commands
* translation
* remove redundant set user state reset state
* update cache ttl
Co-authored-by: lngohumble <lngohumble@gmail.com>
* anonymous user ID for lnurl
* anonymous lnurl
* migrate at every start, not good
* anon id at user creation
* migrations file
* fix database migration task
* remove comment
* anon label
Co-authored-by: lngohumble <lngohumble@gmail.com>
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* some fixes
* tigher error checking
* add CreatedAt and UpdatedAt flags
* check error in GetTransaction
* add bunt transaction package and rename stuff
* use transaction.Base as function receiver for transaction functions
* add transaction.Base.Set function
* fix tiptooltip bunt index
* refactor
* auto update updated at
* refactor
* remove balance from error
* fix updated at
* faucet errors
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline receive
* use bunt tx for inline send
* use bunt tx for pay
* fix typo
* readd context
* some fixes
* tigher error checking
* add generalized bunt database transaction
* use bunt tx for inline faucet and send
* use bunt tx for inline send
* add CreatedAt and UpdatedAt flags
* check error in GetTransaction
* add bunt transaction package and rename stuff
* use transaction.Base as function receiver for transaction functions
* add transaction.Base.Set function
* fix tiptooltip bunt index
* refactor
* auto update updated at
* fix updated at
* faucet errors
* refactor
* remove balance from error
* rebase fixes
* fix imports
* fix de string
* fix receive and send
* faucet language
* remove pay constructor
* release faucet
* remove redundant inTransaction
* remove constructor
* remove constructor
* transaction get pointer receiver
* send race condition
* inactivate in db
Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>