Skip to content

Commit

Permalink
ndb: add process_client_event helper
Browse files Browse the repository at this point in the history
This is a quick helper for the new client event processing functionality
  • Loading branch information
jb55 committed Sep 25, 2023
1 parent dacade2 commit f591ad2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nostrdb/Ndb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f591ad2

Please sign in to comment.