Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Dec 17, 2024
1 parent 03c1049 commit 90c88e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions Sources/XMTPiOS/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ public final class Client {
let dbURL = directoryURL.appendingPathComponent(alias).path

let ffiClient = try await LibXMTP.createClient(
host: options.api.env.url,
isSecure: options.api.env.isSecure == true,
api: connectToBackend(
host: options.api.env.url,
isSecure: options.api.env.isSecure == true),
db: dbURL,
encryptionKey: options.dbEncryptionKey,
inboxId: inboxId,
Expand Down Expand Up @@ -297,8 +298,9 @@ public final class Client {
let dbURL = directoryURL.appendingPathComponent(alias).path

let ffiClient = try await LibXMTP.createClient(
host: api.env.url,
isSecure: api.env.isSecure == true,
api: connectToBackend(
host: api.env.url,
isSecure: api.env.isSecure == true),
db: dbURL,
encryptionKey: nil,
inboxId: inboxId,
Expand Down
4 changes: 2 additions & 2 deletions Sources/XMTPiOS/Conversation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public enum Conversation: Identifiable, Equatable, Hashable {
public func isCreator() async throws -> Bool {
switch self {
case let .group(group):
return try group.isCreator()
return try await group.isCreator()
case let .dm(dm):
return try dm.isCreator()
return try await dm.isCreator()
}
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/XMTPiOS/Extensions/Ffi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ extension FfiConversation {
Dm(ffiConversation: self, client: client)
}

func toConversation(client: Client) throws -> Conversation {
if try conversationType() == .dm {
func toConversation(client: Client) async throws -> Conversation {
if try await conversationType() == .dm {
return Conversation.dm(self.dmFromFFI(client: client))
} else {
return Conversation.group(self.groupFromFFI(client: client))
Expand Down

0 comments on commit 90c88e8

Please sign in to comment.