Skip to content

Commit

Permalink
add can message function to ios
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Feb 16, 2024
1 parent cbcc042 commit ba6e55e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ios/XMTPModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ public class XMTPModule: Module {

return try await client.canMessage(peerAddress)
}

AsyncFunction("canGroupMessage") { (clientAddress: String, peerAddresses: [String]) -> Bool in
guard let client = await clientsManager.getClient(key: clientAddress) else {
throw Error.noClient
}

return try await client.canMessageV3(addresses: peerAddresses)
}

AsyncFunction("staticCanMessage") { (peerAddress: String, environment: String, appVersion: String?) -> Bool in
do {
Expand Down
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.8.5"
s.dependency "XMTP", "= 0.8.6"
end

0 comments on commit ba6e55e

Please sign in to comment.