Skip to content

Commit

Permalink
fix up swift
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jul 1, 2024
1 parent eb3a9e2 commit 90c6eae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ios/Wrappers/ConversationWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct ConversationWrapper {
"topic": conversation.topic,
"createdAt": UInt64(conversation.createdAt.timeIntervalSince1970 * 1000),
"context": context,
"peerAddress": conversation.peerAddress,
"peerAddress": try conversation.peerAddress,
"version": conversation.version == .v1 ? "v1" : "v2",
"conversationID": conversation.conversationID ?? "",
"keyMaterial": conversation.keyMaterial?.base64EncodedString() ?? "",
Expand Down
4 changes: 2 additions & 2 deletions ios/XMTPModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ public class XMTPModule: Module {
guard let conversation = try await findConversation(clientAddress: clientAddress, topic: conversationTopic) else {
throw Error.conversationNotFound(conversationTopic)
}
return ConsentWrapper.consentStateToString(state: await conversation.consentState())
return ConsentWrapper.consentStateToString(state: try await conversation.consentState())
}

AsyncFunction("consentList") { (clientAddress: String) -> [String] in
Expand Down Expand Up @@ -682,7 +682,7 @@ public class XMTPModule: Module {
await subscriptionsManager.get(getConversationsKey(clientAddress: clientAddress))?.cancel()
await subscriptionsManager.set(getConversationsKey(clientAddress: clientAddress), Task {
do {
for try await conversation in await client.conversations.stream() {
for try await conversation in try await client.conversations.stream() {
try sendEvent("conversation", [
"clientAddress": clientAddress,
"conversation": ConversationWrapper.encodeToObj(conversation, client: client),
Expand Down

0 comments on commit 90c6eae

Please sign in to comment.