Commit graph

38 commits

Author SHA1 Message Date
callebtc
250c036c47 returns 2022-08-20 01:03:22 +02:00
callebtc
127f95b8de boom 2022-08-20 00:17:19 +02:00
gohumble
fbc47c0fb9 fix payments 2022-08-19 23:37:28 +02:00
callebtc
0c29fec19f lnbits stuff 2022-08-19 23:36:11 +02:00
gohumble
02bbc8e5a3 fix typo 2022-08-17 17:49:30 +02:00
gohumble
61fb20e132 update go-lnurl 2022-08-17 17:44:19 +02:00
callebtc
042ccaf8ef unpickle lnbits errors correctly 2022-08-13 12:18:33 +02:00
calle
6f2a95609e
Tip error (#362)
* tip no error message
2022-06-14 16:06:16 +02:00
LightningTipBot
d2a63c07a3
Transactions int64 amount (#356)
* webln and image

* transactions with int64 amounts

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-05-31 10:49:42 +02:00
calle
0631fd53eb
WIP: Satdress (#331)
* satdress rebase

* check config

* satdress rebase

* check config

* check for invoices

* return error

* Update inline photo v5 (#332)

* update url

* round logo

* resize

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* new logo (#333)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* help (#334)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* add file (#335)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* markdown (#336)

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* satdress rebase

* check config

* satdress rebase

* check for invoices

* return error

* satdress works

* add lnbits

* timeout

* error checking

* small lnd

* errors

* button fix

Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com>
2022-04-29 14:28:12 +02:00
LightningTipBot
b07053172b
help (#334)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-04-16 00:20:52 +02:00
gohumble
bf643f103d
🪄 update telebot v3 🤖 (#325)
* 🚧 minor changes to all handlers...

* 🚧 passing callback to tryEditStack

* 🚧 edit and delete callback messages

* 🚧 refactor again

* 🚧 uncomment this

* 🚧 using ctx.Message().Text

* 🚧 refactor

* 🚧 refactor

* 🚧 uncomment

* context not queruy

* 🚧 update forked lightningtipbot

* 🚧 reset ArticleResult

* fix inline receive

* readd shop

* remove chat from shopView

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-03-27 22:19:38 +02:00
calle
71d8aa202c
Group invite link management (#310)
* group invite link

* link

* works

* ticketinvoiceevent type

* Add invoice event interface

* add AssertEventType

* generalize AssertEventType invocation

* wip: payment button

* all new

* callback

* fix TicketEvent Key()

* invoiceEvent in ticketEvent

* fix errors

* add payment button

* commission

* minimum price

* remove redundant ticket event data

* commission

* fixes

* update balance

* notify user if ticket < 10

* commission rounding error

* refactor

* refactor

* /join

* add /join handler

* fix handler

* fix /join

* fix handler

* fix /join interceptor

* add startUserInterceptor

* delete qr

* no test blyad

* fix defer

* message

Co-authored-by: gohumble <lngohumble@gmail.com>
2022-03-17 00:21:28 +01:00
gohumble
725af545ab
WIP: adding downloadMyProfilePicture and botProfilePicture to LNURL Meta (#297)
* adding downloadMyProfilePicture and botProfilePicture to serveLNURLFirst (pay)

* fix image download to ram

* add downloadProfilePicture

* add cache and download limit

* error checks

* user picture

* empty entry bug check for uuid

* check

* fix example

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-02-11 10:04:08 +01:00
gohumble
96292604c7
adding lnurl auth (#294)
* adding lnurl auth poc

* add response and translation

* refactor

* simpler

* using http bot client with proxy transport

* functions

* translations

* clean

* comment

* revert

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-22 23:25:21 +01:00
gohumble
8f60cb82f3
add admin service (#263)
* add admin server + service

* string fixes

* ban and unban user

* add return

* ban using admin key

* ban reason

* remove redundant func call

* add http status

* add log

* anon_id_sha256 (#262)

* anon_id_sha256

* refactor sha256 hash to strings package

* oops

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>

* add admin server + service

* ban and unban user

* string fixes

* add return

* ban using admin key

* ban reason

* remove redundant func call

* add http status

* add log

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com>
2022-01-05 01:40:37 +01:00
LightningTipBot
e275b8760a
anon_id_sha256 (#262)
* anon_id_sha256

* refactor sha256 hash to strings package

* oops

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-01-05 01:28:17 +01:00
LightningTipBot
09d3af411e
Better longging 1337 (#206)
* speed up tx lock

* better logging and lnurl lightning: prefix

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-24 15:34:17 +01:00
LightningTipBot
f8fadb1729
Onlysats (#181)
* speed up tx lock

* add shops

* shop

* scrolling

* 🚀 add state stateCallbackMessage 🚀

* no shop

* scroll

* add shop browser

* scroll bug

* add buttons.go

* scrolling

* shop

* lnurl print after serving

* shop deletion

* adding and removing shops

* display photo captions

* refactor

* shops

* shops

* files work

* rename shop

* error handling

* fixes

* payments

* confirm delete all shops

* adding new items fix

* own bunt db for shop

* unlock transaction

* remove double print

* add transaction.Lock(id)

* unlock getShop

* add default interceptors to shop

* more files

* go sleep

* add fileStateResetTicker

* async sleep

* add runtime.ResettableFunctionTicker

* remove default duration

* generalized concurrent mutex

* simplify function ticker

* status message ticker queue

* add start index to shopViewDeleteAllStatusMsgs

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
Co-authored-by: lngohumble <lngohumble@gmail.com>
2021-12-23 10:16:13 +01:00
LightningTipBot
4b620186f1
Lnbits postgres compatible (#172)
* speed up tx lock

* webhook fix

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-22 02:35:00 +01:00
LightningTipBot
a4f5b21f1d
Invoice events refactoring (#168)
* speed up tx lock

* clean up

* refactor lnurl comment notification

* fix function name

* transaction: do not check balance; refactor invoice notifications

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-19 15:41:01 +01:00
LightningTipBot
9e4b612c26
Invoice events for inline receive (#164)
* speed up tx lock

* receive via invoice

* update telebot to save message InlineID

* remove debug ifs

* correct response

* comment

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-17 20:41:13 +00:00
LightningTipBot
ba6bf0a317
telebot fork user ID int64 (#151)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-01 11:24:28 +01:00
LightningTipBot
0abe56dfba
Revert "telebot fork user ID int64 (#149)" (#150)
This reverts commit 7c8ba7895d.
2021-12-01 08:59:51 +01:00
LightningTipBot
7c8ba7895d
telebot fork user ID int64 (#149)
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-12-01 08:52:47 +01:00
LightningTipBot
8f569ed4c3
send input (#138)
* 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>
2021-11-17 19:51:51 +01:00
LightningTipBot
1f25cc6ded
Add russian translation (#136)
* Add Russian translation

* turn on ru.toml

* load gently

Co-authored-by: Filiph Protsenko <filprocenko@gmail.com>
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2021-11-15 16:41:34 +01:00
calle
e1d858752f
emojis for logging (#133)
* emojis for logging

* emojis for logging
2021-11-15 10:18:57 +01:00
gohumble
dd57247266
increase lnbits pay timeout (#127) 2021-11-14 22:03:14 +01:00
LightningTipBot
11edce049e
General amount (#118)
* generalized amount started

* add new file

* uncomment old pay

* longer comments

* lnurl pay with generalized amount input

* generalized amount for /invoice

* amount input for all commands

* remove logging

* delete old comments
2021-10-30 21:26:01 +02:00
LightningTipBot
c90cfd9d8a
tipjar (#114)
* tipjar

* tipjar

* fix pointers and wallet keys

* better comment
2021-10-27 11:55:59 +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
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
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
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
34d951ee85
fix state reset (#61)
* fix state reset

* fix reference

* ask for amount explicitly
2021-09-13 20:23:59 +02:00
gohumble
acf0cb5af6 Initial commit 2021-09-10 08:52:44 +02:00