mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #738 from BlueprintCoding/patch-2
Update poe-client.js
This commit is contained in:
@@ -381,6 +381,7 @@ class Client {
|
||||
await this.connect_ws();
|
||||
console.log('Client initialized.');
|
||||
}
|
||||
|
||||
|
||||
get_device_id() {
|
||||
const user_id = this.viewer["poeUser"]["id"];
|
||||
@@ -397,7 +398,7 @@ class Client {
|
||||
const botNameKeyName = 'chatOfBotHandle'
|
||||
const defaultBotKeyName = 'defaultBotNickname'
|
||||
|
||||
const r = await request_with_retries(() => this.session.get(this.home_url));
|
||||
const r = await request_with_retries(() => this.session.post(this.home_url));
|
||||
const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">(.+?)<\/script>/;
|
||||
const jsonText = jsonRegex.exec(r.data)[1];
|
||||
const nextData = JSON.parse(jsonText);
|
||||
|
Reference in New Issue
Block a user