Skip to content

Commit

Permalink
name it preference list and confirm tests still pass
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 25, 2023
1 parent ece91cf commit 815c117
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/XMTP/Contacts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AllowList {
throw ContactError.invalidIdentifier
}

let envelopes = try await client.query(topic: .allowList(identifier))
let envelopes = try await client.query(topic: .preferenceList(identifier))

let allowList = AllowList(client: client)

Expand Down Expand Up @@ -109,7 +109,7 @@ class AllowList {
)

let envelope = Envelope(
topic: Topic.allowList(identifier),
topic: Topic.preferenceList(identifier),
timestamp: Date(),
message: Data(message)
)
Expand Down
4 changes: 2 additions & 2 deletions Sources/XMTP/Messages/Topic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum Topic {
userInvite(String),
directMessageV1(String, String),
directMessageV2(String),
allowList(String)
preferenceList(String)

var description: String {
switch self {
Expand All @@ -31,7 +31,7 @@ public enum Topic {
return wrap("dm-\(addresses)")
case let .directMessageV2(randomString):
return wrap("m-\(randomString)")
case let .allowList(identifier):
case let .preferenceList(identifier):
return wrap("pppp-\(identifier)")
}
}
Expand Down

0 comments on commit 815c117

Please sign in to comment.