1
0
mirror of git://jb55.com/damus synced 2024-09-05 21:03:51 +00:00

ndb: add process_client_event helper

This is a quick helper for the new client event processing functionality
This commit is contained in:
William Casarin 2023-09-24 17:06:35 -07:00
parent dacade299d
commit f591ad2dff

View File

@ -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