mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +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:
parent
dacade299d
commit
f591ad2dff
@ -176,6 +176,12 @@ class Ndb {
|
|||||||
lookup_profile_with_txn_inner(pubkey: pubkey, txn: txn)
|
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 {
|
func process_event(_ str: String) -> Bool {
|
||||||
return str.withCString { cstr in
|
return str.withCString { cstr in
|
||||||
return ndb_process_event(ndb.ndb, cstr, Int32(str.utf8.count)) != 0
|
return ndb_process_event(ndb.ndb, cstr, Int32(str.utf8.count)) != 0
|
||||||
|
Loading…
Reference in New Issue
Block a user