From f591ad2dff192f1a90066c707d2c8260df138bf0 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 24 Sep 2023 17:06:35 -0700 Subject: [PATCH] ndb: add process_client_event helper This is a quick helper for the new client event processing functionality --- nostrdb/Ndb.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nostrdb/Ndb.swift b/nostrdb/Ndb.swift index 395ae332..e55c543e 100644 --- a/nostrdb/Ndb.swift +++ b/nostrdb/Ndb.swift @@ -175,6 +175,12 @@ class Ndb { func lookup_profile_with_txn(_ pubkey: Pubkey, txn: NdbTxn) -> 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