feat: store message size

This commit is contained in:
Vlad Stan 2023-02-09 15:16:22 +02:00
parent f331a19d75
commit c488f5d5e0
4 changed files with 12 additions and 5 deletions

View file

@ -82,11 +82,12 @@ async def create_event(relay_id: str, e: NostrEvent):
created_at,
kind,
content,
sig
sig,
size
)
VALUES (?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
""",
(relay_id, e.id, e.pubkey, e.created_at, e.kind, e.content, e.sig),
(relay_id, e.id, e.pubkey, e.created_at, e.kind, e.content, e.sig, e.size_bytes),
)
# todo: optimize with bulk insert