diff --git a/android/build.gradle b/android/build.gradle index d135b80e2..5a00d4ddf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -95,7 +95,7 @@ repositories { dependencies { implementation project(':expo-modules-core') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" - implementation "org.xmtp:android:0.6.7" + implementation "org.xmtp:android:0.6.10" implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.facebook.react:react-native:0.71.3' implementation "com.daveanthonythomas.moshipack:moshipack:1.0.1" diff --git a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt index 1e4bc02b3..6848a8e26 100644 --- a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt +++ b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt @@ -496,15 +496,16 @@ class XMTPModule : Module() { client.contacts.isAllowed(address) } - Function("isBlocked") { clientAddress: String, address: String -> - logV("isBlocked") + Function("isDenied") { clientAddress: String, address: String -> + logV("isDenied") val client = clients[clientAddress] ?: throw XMTPException("No client") - client.contacts.isBlocked(address) + client.contacts.isDenied(address) } - AsyncFunction("blockContacts") { clientAddress: String, addresses: List -> + AsyncFunction("denyContacts") { clientAddress: String, addresses: List -> + logV("denyContacts") val client = clients[clientAddress] ?: throw XMTPException("No client") - client.contacts.block(addresses) + client.contacts.deny(addresses) } AsyncFunction("allowContacts") { clientAddress: String, addresses: List -> @@ -522,7 +523,7 @@ class XMTPModule : Module() { ?: throw XMTPException("no conversation found for $conversationTopic") when (conversation.consentState()) { ConsentState.ALLOWED -> "allowed" - ConsentState.BLOCKED -> "blocked" + ConsentState.DENIED -> "denied" ConsentState.UNKNOWN -> "unknown" } } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1ac1075e2..ecef5c637 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -415,7 +415,7 @@ PODS: - GenericJSON (~> 2.0) - Logging (~> 1.0.0) - secp256k1.swift (~> 0.1) - - XMTP (0.6.3-alpha0): + - XMTP (0.6.6-alpha0): - Connect-Swift - GzipSwift - web3.swift @@ -423,7 +423,7 @@ PODS: - XMTPReactNative (0.1.0): - ExpoModulesCore - MessagePacker - - XMTP (= 0.6.3-alpha0) + - XMTP (= 0.6.6-alpha0) - XMTPRust (0.3.6-beta0) - Yoga (1.14.0) @@ -680,8 +680,8 @@ SPEC CHECKSUMS: secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634 SwiftProtobuf: bcfd2bc231cf9ae552cdc7c4e877bd3b41fe57b1 web3.swift: 2263d1e12e121b2c42ffb63a5a7beb1acaf33959 - XMTP: 3181e5c8e9d9885a97e5c5b22ac523bf9a713656 - XMTPReactNative: 27185719aae360bc307cc6faf7bcf879cf681d97 + XMTP: 6ba5240596cfe7d60248398b651b230dcf88be29 + XMTPReactNative: f0ed6e62b6e52dd3a8582d4d6f987e27fe6243ff XMTPRust: 3c958736a4f4ee798e425b5644551f1c948da4b0 Yoga: 065f0b74dba4832d6e328238de46eb72c5de9556 diff --git a/example/src/HomeScreen.tsx b/example/src/HomeScreen.tsx index 0f60ac520..dcd241228 100644 --- a/example/src/HomeScreen.tsx +++ b/example/src/HomeScreen.tsx @@ -66,7 +66,7 @@ function ConversationItem({ conversation, client }: { conversation: Conversation conversation.consentState().then(result => { setConsentState(result); }) - const blockContact = () => client?.contacts.block([conversation.peerAddress]); + const denyContact = () => client?.contacts.deny([conversation.peerAddress]); return (