damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit f591ad2dff192f1a90066c707d2c8260df138bf0
parent dacade299d245d444b1de6381105d73eb4c412e8
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 24 Sep 2023 17:06:35 -0700

ndb: add process_client_event helper

This is a quick helper for the new client event processing functionality

Diffstat:
Mnostrdb/Ndb.swift | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/nostrdb/Ndb.swift b/nostrdb/Ndb.swift @@ -175,6 +175,12 @@ class Ndb { func lookup_profile_with_txn<Y>(_ pubkey: Pubkey, txn: NdbTxn<Y>) -> ProfileRecord? { lookup_profile_with_txn_inner(pubkey: pubkey, txn: txn) } + + func process_client_event(_ str: String) -> Bool { + return str.withCString { cstr in + return ndb_process_client_event(ndb.ndb, cstr, Int32(str.utf8.count)) != 0 + } + } func process_event(_ str: String) -> Bool { return str.withCString { cstr in