Skip to content

Commit

Permalink
Group Preferences consentState Patch (#275)
Browse files Browse the repository at this point in the history
When implementing change for Group Preferences Actions, the consentState function was not updated.

See PR: #272
  • Loading branch information
zombieobject authored Mar 5, 2024
1 parent 0e4e79c commit 0054de8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Sources/XMTPiOS/Conversation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ public enum Conversation: Sendable {
}

public func consentState() async -> ConsentState {
let client: Client

switch self {
case .v1(let conversationV1):
client = conversationV1.client
return await conversationV1.client.contacts.consentList.state(address: peerAddress)
case .v2(let conversationV2):
client = conversationV2.client
return await conversationV2.client.contacts.consentList.state(address: peerAddress)
case let .group(group):
client = group.client
return await group.client.contacts.consentList.groupState(groupId: group.id)
}

return await client.contacts.consentList.state(address: peerAddress)
}

public var version: Version {
Expand Down

0 comments on commit 0054de8

Please sign in to comment.