Skip to content

Commit

Permalink
fix login
Browse files Browse the repository at this point in the history
  • Loading branch information
piloking committed Oct 7, 2024
1 parent b8c320f commit feff38d
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 87 deletions.
14 changes: 14 additions & 0 deletions examples/simple-send.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Client } from "@evex/linejs";

const client = new Client();

await client.login({
email: "YOUR_EMAIL",
password: "YOUR_PASSWORD",
polling: [], // no polling
});

await client.sendMessage({
to: "MID", // mid (group c~ ,user u~)
text: "Hello, world!"
})
14 changes: 14 additions & 0 deletions examples/square-simple-send.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Client } from "@evex/linejs";

const client = new Client();

await client.login({
email: "YOUR_EMAIL",
password: "YOUR_PASSWORD",
polling: [], // no polling
});

await client.sendSquareMessage({
to: "MID", // mid (squareChat m~)
text: "Hello, world!"
})
6 changes: 3 additions & 3 deletions packages/linejs/client/clients/base-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
protected IS_POLLING_SQUARE = false;
protected IS_POLLING_TALK = false;

private async pollingSquareEvents() {
public async pollingSquareEvents() {
if (this.IS_POLLING_SQUARE) {
return;
}
Expand Down Expand Up @@ -404,7 +404,7 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {

public revision: number = 0;

private async pollingTalkEvents() {
public async pollingTalkEvents() {
if (this.IS_POLLING_TALK) {
return;
}
Expand Down Expand Up @@ -977,7 +977,7 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
Buffer.from(e2eeInfo.metadata.encryptedKeyChain, "base64"),
);
const e2eeLogin = await this.confirmE2EELogin(
response.verifier,
response[3],
deviceSecret,
);
response = await this.loginV2(
Expand Down
Loading

0 comments on commit feff38d

Please sign in to comment.