瀏覽代碼

add lookupContactIdByAddress dcContext wrapper method

cyberta 4 年之前
父節點
當前提交
9b9bae8cee
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      DcCore/DcCore/DC/Wrapper.swift

+ 4 - 0
DcCore/DcCore/DC/Wrapper.swift

@@ -188,6 +188,10 @@ public class DcContext {
         dc_add_address_book(contextPointer, contactString)
     }
 
+    public func lookupContactIdByAddress(_ address: String) -> Int {
+        return Int(dc_lookup_contact_id_by_addr(contextPointer, addr))
+    }
+
     public func getChat(chatId: Int) -> DcChat {
         let chatPointer = dc_get_chat(contextPointer, UInt32(chatId))
         return DcChat(chatPointer: chatPointer)