mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
Nostr bech32 dm (#109)
* nostr: bech32 keys and remember last DM check * cump to 0.9.2 * make format
This commit is contained in:
@@ -334,3 +334,27 @@ async def update_lightning_invoice(
|
||||
hash,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
async def set_nostr_last_check_timestamp(
|
||||
db: Database,
|
||||
timestamp: int,
|
||||
conn: Optional[Connection] = None,
|
||||
):
|
||||
await (conn or db).execute(
|
||||
f"UPDATE nostr SET last = ? WHERE type = ?",
|
||||
(timestamp, "dm"),
|
||||
)
|
||||
|
||||
|
||||
async def get_nostr_last_check_timestamp(
|
||||
db: Database,
|
||||
conn: Optional[Connection] = None,
|
||||
):
|
||||
row = await (conn or db).fetchone(
|
||||
f"""
|
||||
SELECT last from nostr WHERE type = ?
|
||||
""",
|
||||
("dm",),
|
||||
)
|
||||
return row[0] if row else None
|
||||
|
||||
Reference in New Issue
Block a user