Skip to content

Commit 5d25b4c

Browse files
committed
Group Preferences consentState Patch
When implementing change for Group Preferences Actions, the consentState function was not updated. See PR: #272
1 parent 0e4e79c commit 5d25b4c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Sources/XMTPiOS/Conversation.swift

+3-7
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,14 @@ public enum Conversation: Sendable {
3131
}
3232

3333
public func consentState() async -> ConsentState {
34-
let client: Client
35-
3634
switch self {
3735
case .v1(let conversationV1):
38-
client = conversationV1.client
36+
return await conversationV1.client.contacts.consentList.state(address: peerAddress)
3937
case .v2(let conversationV2):
40-
client = conversationV2.client
38+
return await conversationV2.client.contacts.consentList.state(address: peerAddress)
4139
case let .group(group):
42-
client = group.client
40+
return await group.client.contacts.consentList.groupState(groupId: group.id)
4341
}
44-
45-
return await client.contacts.consentList.state(address: peerAddress)
4642
}
4743

4844
public var version: Version {

0 commit comments

Comments
 (0)