diff --git a/ios/XMTPModule.swift b/ios/XMTPModule.swift index cc6d8723c..9ee31a8d6 100644 --- a/ios/XMTPModule.swift +++ b/ios/XMTPModule.swift @@ -232,6 +232,10 @@ public class XMTPModule: Module { } AsyncFunction("loadBatchMessages") { (clientAddress: String, topics: [String]) -> [[UInt8]] in + guard let client = clients[clientAddress] else { + throw Error.noClient + } + var topicsList: [String: Pagination?] = [:] topics.forEach { topicJSON in let jsonData = topicJSON.data(using: .utf8)!