Commit graph

51 commits

Author SHA1 Message Date
LightningTipBot
e4833bd9c6
User cache (#117)
* 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>
2021-10-29 22:04:53 +02:00
LightningTipBot
51c410c045
Tipjar hotfix2: translations and help (#116)
* translations and help

* shorten it
2021-10-27 15:23:01 +02:00
LightningTipBot
f0385128db
add username to tipjar (#115) 2021-10-27 12:04:32 +02:00
LightningTipBot
c90cfd9d8a
tipjar (#114)
* tipjar

* tipjar

* fix pointers and wallet keys

* better comment
2021-10-27 11:55:59 +02:00
LightningTipBot
97b6e8f043
LNURL errors verbose (#110)
* internal/telegram/lnurl.go

* update gjson
2021-10-26 19:37:04 +02:00
LightningTipBot
8da9e0c38c
atoi is 32 bit only, change to ParseInt (#109) 2021-10-24 20:52:24 +02:00
LightningTipBot
fd9ad39b0c
anonymous user ID for lnurl (#107)
* 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>
2021-10-24 20:31:52 +02:00
LightningTipBot
bb00253122
Translation Indonesian (#106)
* Translation to Indonesian language

First time using github but I think I did everything correctly though.
Truly sorry if I've made a noob mistake
Trying to make the language as friendly yet polite and as formal as possible
Thanx and keep up the great work

* inline commands in english

* readd en.toml

* enable translation

Co-authored-by: hmalau <92701132+hmalau@users.noreply.github.com>
2021-10-18 20:46:59 +02:00
LightningTipBot
10c9121cc7
lnurl for user id (#104)
* lnurl for user id

* adjust help
2021-10-18 10:30:07 +02:00
LightningTipBot
236097a461
inline send and receive to specific user (#103) 2021-10-17 16:13:41 +02:00
LightningTipBot
22d4ab284c
turkish translations (#101)
* turkish translations

* fix

* fix

* fix

* add tr.toml
2021-10-13 17:13:28 +03:00
LightningTipBot
3a2c5b2c51
Portuguese (#100)
* For mango-selling grannies in Brazil

* fix

* rename to pt-br.toml

Co-authored-by: Koty <89604768+kotyauditore@users.noreply.github.com>
2021-10-13 09:01:06 +03:00
LightningTipBot
c7212131fa
Fix fr.toml (#99)
* Create fr.toml 

French translation

* Update with correct line breaks

* typo change

* fix mistakes, enable fr.toml

Co-authored-by: Nicolas Bustamante <92287725+nbstme@users.noreply.github.com>
2021-10-13 08:43:37 +03:00
LightningTipBot
88fdb4de9b small fix 2021-10-11 18:20:25 +03:00
Bas Simons
693f12470c
Better dutch translations (#95)
* Update nl.toml

better dutch

* Update nl.toml
2021-10-11 09:08:37 +03:00
Nicolas Bustamante
887751cb0f
small typo (#96) 2021-10-11 09:07:44 +03:00
LightningTipBot
08c7ff5113
Fiat price hotfix2 (#94)
* INR added

* also accept currency string

* dividion by 0

* better check
2021-10-08 10:53:33 +03:00
LightningTipBot
7c77d268f6
Fiat price hotfix2 (#93)
* INR added

* also accept currency string

* dividion by 0
2021-10-08 10:51:43 +03:00
LightningTipBot
61bc3710c0
Fiat price hotfix2 (#92)
* INR added

* also accept currency string
2021-10-08 10:45:29 +03:00
gohumble
a880d7b044
Contains -> HasPrefix || HasSuffix (#91)
Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>
2021-10-08 08:42:19 +02:00
LightningTipBot
8c7c22b0d8
price checker (#90)
* price checker

* more currencies

* debug messages
2021-10-08 08:35:46 +02:00
gohumble
94eff98f60
bunt transaction generalization (#73)
* 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>
2021-10-08 00:46:52 +03:00
lngohumble
6a5f09fa18 Revert "price watcher"
This reverts commit 808a5a3b
2021-10-07 22:08:23 +02:00
LightningTipBot
808a5a3b72 price watcher 2021-10-07 22:53:07 +03:00
LightningTipBot
903cc3c2e2
Lnurlp comments (#89)
* lnurl comments for RECEIVING

* fix import cycle

* fix import

* rename WebhookServer to Server

* rename LNURLInvoice to Invoice

* add str package. MarkdownEscape lnurl.Invoice comment

* add str package

* check for comment length

* lnurl pay with comment

* lnurl pay with comment

* check for wallet existence

* repackage main to internal

Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-10-07 00:21:21 +03:00
LightningTipBot
f6ef7933f5
refactor translations (#88)
* refactor translations

* fix print error

* add rest of languages

* remove unnecessary package
2021-10-06 21:32:44 +03:00
LightningTipBot
48fce72559
Italian translation (#87)
* add it.toml

* fix toml and load localizzazione

* fix commands

* update translation

* fix strings

* remove duplicate

Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-10-06 01:40:16 +03:00
LightningTipBot
31caa37657
Inline translations (#85)
* translate faucets

* fix faucet buttons
2021-09-27 00:57:59 +02:00
LightningTipBot
a9b9d0bfdd
translate faucets (#84) 2021-09-27 00:14:35 +02:00
LightningTipBot
a7a7968d09
fix /pay message (#83) 2021-09-26 23:09:11 +02:00
LightningTipBot
7e532f3f01
Get user hotfix1 (#82)
* database error on lookup fail

* still return user skeleton on error
2021-09-26 19:22:53 +02:00
LightningTipBot
4d5731bf51
adjust es.toml (#81)
* adjust es.toml

* adjust es.toml
2021-09-26 10:19:56 +02:00
LightningTipBot
5784126bbd
Amount k (#79)
* amounts with k

* faucet with getAmount
2021-09-25 18:08:23 +02:00
LightningTipBot
af21ad4bea
hotfixes (#78) 2021-09-25 17:50:18 +02:00
LightningTipBot
4830928352
I18n hotfix1 (#77)
* fix context for /start

* fix tip from translation
2021-09-25 15:04:53 +02:00
LightningTipBot
167b581d3e
translations (#71)
* squash

* balance too low message

* add context to start

* add translations

* translation readme

* translations for all

* equalize

* new faucet empty message

* commands

* localize

* add more commands

* adjust

* add language code

* add languageCode context

* cancel handler with struct language

* inline objects use their language

* button translations

* send language

* add GetLnbitsUser

* different localizers

* fix publicLanguageCode

* translate balance and donate

* whatever bro

* translateUser

* pull bro

* asd

* Create nl.toml (#74)

* Create nl.toml

* Update nl.toml

* I18n (#75)

* Whatever brah

* Update es.toml

* Whatever brah

* Update nl.toml (#76)

* clean comments

* fix amount

Co-authored-by: lngohumble <lngohumble@gmail.com>
Co-authored-by: maxmerlin78 <91363235+maxmerlin78@users.noreply.github.com>
Co-authored-by: Koty <89604768+kotyauditore@users.noreply.github.com>
2021-09-25 14:07:29 +02:00
LightningTipBot
2c51662a75
Send and pay data persistent (#72)
* new lookup function

* use persitant object

* rename to avoid collisions

* send with persistent structs

* add persistant pay struct

* finish up

* clean comments

* revert

* fix ID check

* less logging

* error logging fixed

* payment error verbose

* reply to interceptor for send

* reply to send command if channel
2021-09-22 21:23:53 +02:00
gohumble
fbbe18d7a7
add interceptor and handler context (#69)
* add interceptor for handler context

* remove user load

* remove UserInitializedWallet

* remove getuser invocation

* add lnbits user to inlineFaucet

* set wallet client

* lnbits user to inline receive

* lnbits user to inline send

* add context to handleInlineReceiveQuery

* add handler.go

* fix help message

* fix handler registration

* rename

* check if reply to is nil

* remove unwanted stuff

* error handlers

* remove client from wallet

* rename force to require

* string fixes

* add intercept.Func

* add PrivateChat check

* remove private chat requirement for anytexthandler

* fix callback

* errors fixed

* fix callback

* loadUser

* do not require

* check type in interceptor

* check type in interceptor

* check for user wallets

* allow send for toUser with wallet but not initialized

* fix reply to context

* mdescape

* strfux

* set state columns only

* update str

* set user now

* anytext should not load user outside pm

* rename endpoint to donationEndpoint

* register uppercase endpoints and add comments

* fix photos in logMessageInterceptor

* reduce log level to trace

Co-authored-by: LightningTipBot <hWOofXvq4m@mail.com>
2021-09-21 21:35:10 +02:00
LightningTipBot
e3ba16f5d1
better errors (#68)
* better errors

* better log
2021-09-14 17:46:22 +02:00
LightningTipBot
39ed394984
wrong balance check (#67) 2021-09-14 11:59:36 +02:00
LightningTipBot
1b97544ad5
zapfhahn and kraan (#66) 2021-09-14 11:18:22 +02:00
LightningTipBot
7c33234d91
faucet help (#65) 2021-09-14 09:58:54 +02:00
LightningTipBot
f23e4098e3
add peruser amount (#64)
* add peruser amount

* remove dev edit
2021-09-13 23:53:30 +02:00
LightningTipBot
1a073b339b
faucet progress bar (#63)
* faucet progress bar

* format
2021-09-13 23:39:00 +02:00
LightningTipBot
0653b82c10
add peruser amount to message (#62) 2021-09-13 23:22:17 +02:00
LightningTipBot
4a9dcc9601
Inline faucet (#60) 2021-09-13 22:44:43 +02:00
LightningTipBot
34d951ee85
fix state reset (#61)
* fix state reset

* fix reference

* ask for amount explicitly
2021-09-13 20:23:59 +02:00
LightningTipBot
8af08357d0
tooltip factor messages (#59)
* tooltip factor messages
* init user if not inited
2021-09-10 10:16:49 +02:00
LightningTipBot
a19fa50bb8 readme inline send 2021-09-10 09:53:12 +02:00
LightningTipBot
079e490cac rephrase readme 2021-09-10 09:35:59 +02:00