Skip to content

Commit

Permalink
Merge pull request #353 from xmtp/ar/consent-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer authored Apr 10, 2024
2 parents e9f5d43 + 0ff26a5 commit 8f735e5
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 11 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ repositories {
dependencies {
implementation project(':expo-modules-core')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
implementation "org.xmtp:android:0.9.0"
implementation "org.xmtp:android:0.10.0"
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,12 @@ class XMTPModule : Module() {
}
}

AsyncFunction("refreshConsentList") { clientAddress: String ->
val client = clients[clientAddress] ?: throw XMTPException("No client")
val consentList = client.contacts.refreshConsentList()
consentList.entries.map { ConsentWrapper.encode(it.value) }
AsyncFunction("refreshConsentList") Coroutine { clientAddress: String ->
withContext(Dispatchers.IO) {
val client = clients[clientAddress] ?: throw XMTPException("No client")
val consentList = client.contacts.refreshConsentList()
consentList.entries.map { ConsentWrapper.encode(it.value) }
}
}

AsyncFunction("conversationConsentState") Coroutine { clientAddress: String, conversationTopic: String ->
Expand Down
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ PODS:
- GenericJSON (~> 2.0)
- Logging (~> 1.0.0)
- secp256k1.swift (~> 0.1)
- XMTP (0.9.6):
- XMTP (0.10.0):
- Connect-Swift (= 0.12.0)
- GzipSwift
- LibXMTP (= 0.4.3-beta4)
Expand All @@ -454,7 +454,7 @@ PODS:
- ExpoModulesCore
- MessagePacker
- secp256k1.swift
- XMTP (= 0.9.6)
- XMTP (= 0.10.0)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -751,10 +751,10 @@ SPEC CHECKSUMS:
secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634
SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1
web3.swift: 2263d1e12e121b2c42ffb63a5a7beb1acaf33959
XMTP: 603eecf511ce63f6390b2468fc78500373c1e786
XMTPReactNative: 54fa7119379885089f695af928594d5720666ef6
XMTP: bb638d7ae084814be68d0a549f722d3a4ac2c4e5
XMTPReactNative: 227a0acd1d58e9c1d8dfaa8d7c5cdc91612f70b8
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9

PODFILE CHECKSUM: 95d6ace79946933ecf80684613842ee553dd76a2

COCOAPODS: 1.14.2
COCOAPODS: 1.15.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "xmtpreactnativesdkexample.app"
BlueprintName = "xmtpreactnativesdkexample"
ReferencedContainer = "container:xmtpreactnativesdkexample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "xmtpreactnativesdkexample.app"
BlueprintName = "xmtpreactnativesdkexample"
ReferencedContainer = "container:xmtpreactnativesdkexample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "xmtpreactnativesdkexample.app"
BlueprintName = "xmtpreactnativesdkexample"
ReferencedContainer = "container:xmtpreactnativesdkexample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion ios/XMTPReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Pod::Spec.new do |s|
s.source_files = "**/*.{h,m,swift}"
s.dependency 'secp256k1.swift'
s.dependency "MessagePacker"
s.dependency "XMTP", "= 0.9.6"
s.dependency "XMTP", "= 0.10.0"
end

0 comments on commit 8f735e5

Please sign in to comment.