diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index d64714537..58c02bd8e 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -56,7 +56,7 @@ PODS: - hermes-engine/Pre-built (= 0.71.14) - hermes-engine/Pre-built (0.71.14) - libevent (2.1.12) - - LibXMTP (0.5.3-beta0) + - LibXMTP (0.5.3-beta1) - Logging (1.0.0) - MessagePacker (0.4.7) - MMKV (1.3.5): @@ -449,16 +449,16 @@ PODS: - GenericJSON (~> 2.0) - Logging (~> 1.0.0) - secp256k1.swift (~> 0.1) - - XMTP (0.12.2): + - XMTP (0.12.3): - Connect-Swift (= 0.12.0) - GzipSwift - - LibXMTP (= 0.5.3-beta0) + - LibXMTP (= 0.5.3-beta1) - web3.swift - XMTPReactNative (0.1.0): - ExpoModulesCore - MessagePacker - secp256k1.swift - - XMTP (= 0.12.2) + - XMTP (= 0.12.3) - Yoga (1.14.0) DEPENDENCIES: @@ -711,7 +711,7 @@ SPEC CHECKSUMS: GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa hermes-engine: d7cc127932c89c53374452d6f93473f1970d8e88 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - LibXMTP: c3d7b5cfa4b8df5c57ef01f09358c87dea299a13 + LibXMTP: a4e1c78fd1b174c56b764e96eff70e39c46c2499 Logging: 9ef4ecb546ad3169398d5a723bc9bea1c46bef26 MessagePacker: ab2fe250e86ea7aedd1a9ee47a37083edd41fd02 MMKV: 506311d0494023c2f7e0b62cc1f31b7370fa3cfb @@ -763,8 +763,8 @@ SPEC CHECKSUMS: secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634 SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1 web3.swift: 2263d1e12e121b2c42ffb63a5a7beb1acaf33959 - XMTP: 1a25f62cf29a9ba87a879b8c85062c497c9c813f - XMTPReactNative: dbf769e050ca4214b13c096cb873feb25f0c4429 + XMTP: 5cf6c97a5cfc7295226b8e14dc079f975ea3a4be + XMTPReactNative: 520f9714e30d2909b14718654cc400473ab8d302 Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9 PODFILE CHECKSUM: 95d6ace79946933ecf80684613842ee553dd76a2 diff --git a/ios/XMTPReactNative.podspec b/ios/XMTPReactNative.podspec index 1f0ba1557..0bc569ecd 100644 --- a/ios/XMTPReactNative.podspec +++ b/ios/XMTPReactNative.podspec @@ -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.12.2" + s.dependency "XMTP", "= 0.12.3" end diff --git a/src/lib/Conversations.ts b/src/lib/Conversations.ts index 925b7e1cf..2e2a5b72f 100644 --- a/src/lib/Conversations.ts +++ b/src/lib/Conversations.ts @@ -94,6 +94,28 @@ export default class Conversations< return result } + /** + * This method returns a group by the group id if that group exists in the local database. + * To get the latest list of groups from the network, call syncGroups() first. + * + * @returns {Promise} A Promise that resolves to a Group or undefined if not found. + */ + async findGroup(groupId: string): Promise | undefined> { + return await XMTPModule.findGroup(this.client, groupId) + } + + /** + * This method returns a message by the message id if that message exists in the local database. + * To get the latest list of messages from the network, call syncGroups() first. + * + * @returns {Promise} A Promise that resolves to a DecodedMessage or undefined if not found. + */ + async findV3Message( + messageId: string + ): Promise | undefined> { + return await XMTPModule.findV3Message(this.client, messageId) + } + /** * This method returns a list of all conversations and groups that the client is a member of. * To include the latest groups from the network in the returned list, call syncGroups() first.