Commit graph

29 commits

Author SHA1 Message Date
e0fdada15c Improves Nostr message handling and error logging
Enhances the processing of Nostr messages by adding more robust error handling and logging, providing better insights into potential issues.

Specifically:
- Improves the checks on the websocket connection to log errors and debug information.
- Implements more comprehensive error logging for failed product quantity checks.
- Enhances logging and validation of EVENT messages to prevent potential errors.
- Implements a more robust merchant lookup logic to avoid double processing of events.
- Implements a more lenient time window for direct message subscriptions.
2025-12-31 12:06:07 +01:00
61c2db8e80 Enhances websocket connection robustness
Improves websocket connection reliability by predefining the websocket URL and handling potential queueing errors.

This change also updates the websocket close message for clarity.
2025-12-31 12:06:07 +01:00
631675d2a0 add DEBUG logs 2025-12-31 11:55:28 +01:00
dni ⚡
9c00adbf2d
chore: get rid of secp lib (#114)
* chore: get rid of secp lib

* fixup!
2025-11-04 10:34:24 +01:00
PatMulligan
4938491774
FIX: add urlsafe=True (#111) 2025-09-10 15:10:45 +03:00
Vlad Stan
de7fe059b8
V1 (#106) 2024-11-06 11:50:21 +02:00
Vlad Stan
bdf0b77a51
Use private realay enpoint (#97)
* feat: use private ws endpoint

* chore: bump `min_lnbits_version`

* fix: retry logic

* fix: restart logic

* chore: fux log message
2024-01-22 13:50:40 +02:00
Vlad Stan
4edfc28513 fix: better handling of WS close 2023-11-01 15:04:10 +02:00
Vlad Stan
1a840ac007
feat: refresh merchant from nostr (#85) 2023-09-20 12:06:36 +03:00
Vlad Stan
97ee1c8f49
Fix high load (#84)
* chore: testing

* fix: resubscribe when merchant added/removed

* chore: code clean-up

* fix: temp subscribe when new merchant is added

* fix: new customer profile
2023-09-20 09:17:01 +03:00
Vlad Stan
7f8e2c6b3d chore: code clean-up 2023-09-12 15:05:41 +03:00
Vlad Stan
f2773e0b44
Fix subscription errors (#81)
* pref: merge filters in one

* chore: load nit

* feat: restore individual order
2023-09-12 15:03:37 +03:00
Vlad Stan
33adae672d
Product delete (#64)
* feat: restore stalls from `nostr` as pending

* feat: stall and prod last update time

* feat: restore products and stalls as `pending`

* feat: show pending stalls

* feat: restore stall

* feat: restore a stall from nostr

* feat: add  blank `Restore Product` button

* fix: handle no talls to restore case

* feat: show restore dialog

* feat: allow query for pending products

* feat: restore products

* chore: code clean-up

* fix: last dm and last order query

* chore: code clean-up

* fix: subscribe for stalls and products on merchant create/restore

* feat: add message type to orders

* feat: simplify messages; code format

* feat: add type to DMs; restore DMs from nostr

* fix: parsing ints

* fix: hide copy button if invoice not present

* fix: do not generate invoice if product not found

* feat: order restore: first version

* refactor: move some logic into `services`

* feat: improve restore UX

* fix: too many calls to customer DMs

* fix: allow `All` customers filter

* fix: ws reconnect on server restart

* fix: query for customer profiles only one

* fix: unread messages per customer per merchant

* fix: disable `user-profile-events`

* fix: customer profile is optional

* fix: get customers after new message debounced

* chore: code clean-up

* feat: auto-create zone

* feat: fixed ID for default zone

* feat: notify order paid
2023-06-30 13:12:56 +03:00
Vlad Stan
37d26645da fix: remove closed websocket 2023-04-11 19:16:05 +03:00
Vlad Stan
af780a3080 feat: add reconnect to nostrclient 2023-04-11 19:03:41 +03:00
Vlad Stan
755f8ac9ae fix: filter and notifications 2023-04-03 15:11:46 +03:00
Vlad Stan
9dac1d25b2 feat: keep customer profiles up to date 2023-03-30 13:58:14 +03:00
Vlad Stan
32695bf698 feat: stubs for sync from nostr 2023-03-24 15:10:30 +02:00
Vlad Stan
cdf9b20e05 chore: code clean-up 2023-03-16 18:34:37 +02:00
Vlad Stan
97b9e30efd refactor: reorder and rename methods 2023-03-16 16:32:22 +02:00
Vlad Stan
62e54322f5 feat: extract nostr_client class 2023-03-16 16:01:14 +02:00
Vlad Stan
c976c9918a fix: create invoice for fresh merchant 2023-03-15 23:08:37 +02:00
Vlad Stan
64dbd958b0 feat: delete merchant from the local DB 2023-03-14 16:26:04 +02:00
Vlad Stan
108caa3014 fix: publish events via websocket 2023-03-14 16:00:01 +02:00
Vlad Stan
d58c97f080 feat: user merchant_id instead of user_id 2023-03-14 14:31:30 +02:00
Vlad Stan
2912589b70 feat: create order on DM 2023-03-06 15:03:02 +02:00
Vlad Stan
3988933e40 feat: listen for direct messages 2023-03-03 18:24:53 +02:00
Vlad Stan
b9cf037565 feat: add currency to product 2023-03-03 11:30:48 +02:00
Vlad Stan
639b4cb880 feat: publish event on C_UD for stalls 2023-03-02 10:14:11 +02:00