Skip to content

Commit

Permalink
Refactor publicCanMessage to staticCanMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
kele-leanes committed Nov 30, 2023
1 parent 9dfcd19 commit 9b50f6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ class XMTPModule : Module() {
client.canMessage(peerAddress)
}

AsyncFunction("publicCanMessage") { peerAddress: String, environment: String, appVersion: String? ->
AsyncFunction("staticCanMessage") { peerAddress: String, environment: String, appVersion: String? ->
try {
logV("publicCanMessage")
logV("staticCanMessage")
val options = ClientOptions(api = apiEnvironments(environment, appVersion))
Client.canMessage(peerAddress = peerAddress, options = options)
true
Expand Down
2 changes: 1 addition & 1 deletion ios/XMTPModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public class XMTPModule: Module {
return try await client.canMessage(peerAddress)
}

AsyncFunction("publicCanMessage") { (peerAddress: String, environment: String, appVersion: String?) -> Bool in
AsyncFunction("staticCanMessage") { (peerAddress: String, environment: String, appVersion: String?) -> Bool in
do {
let options = createClientConfig(env: environment, appVersion: appVersion)
return try await XMTP.Client.canMessage(peerAddress, options: options)
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ export async function canMessage(
return await XMTPModule.canMessage(clientAddress, peerAddress);
}

export async function publicCanMessage(
export async function staticCanMessage(
peerAddress: string,
environment: "local" | "dev" | "production",
appVersion?: string | undefined,
): Promise<boolean> {
return await XMTPModule.publicCanMessage(peerAddress, environment, appVersion);
return await XMTPModule.staticCanMessage(peerAddress, environment, appVersion);
}

export async function encryptAttachment(
Expand Down

0 comments on commit 9b50f6f

Please sign in to comment.