Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix x64 no expected browser bug #79

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ t/
/dist/

*.memory-card.json
config.yaml
*-registration.yaml
*-store.db

Expand Down
2 changes: 2 additions & 0 deletions bin/matrix-appservice-wechaty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {
log,
VERSION,
} from '../src/'
import dotenv from 'dotenv'

dotenv.config()
async function main () {
if (process.env.LOG_LEVEL) {
log.level(process.env.LOG_LEVEL as any)
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matrix-appservice-wechaty",
"version": "0.8.28",
"version": "0.8.30",
"description": "Matrix Application Services Bridge for Wechat",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand All @@ -13,6 +13,8 @@
"lint:es": "eslint --ignore-pattern tests/fixtures/ '{bin,src,tests}/**/*.ts' ",
"lint:ts": "tsc --noEmit",
"dev": "LOG_LEVEL=silly ts-node bin/matrix-appservice-wechaty.ts",
"dev:genarate-registration": "ts-node bin/matrix-appservice-wechaty.ts --config config.yaml --url http://localhost:8788 --generate-registration",
"dev:service": "ts-node bin/matrix-appservice-wechaty.ts --config config.yaml --file wechaty-registration.yaml",
"dev:watch": "LOG_LEVEL=silly npx nodemon --watch '{bin,src,tests}/**/*.ts' --exec './node_modules/.bin/ts-node' bin/matrix-appservice-wechaty.ts",
"pack": "npm pack",
"sloc": "sloc bin scripts src tests --details --format cli-table --keys total,source,comment && sloc bin scripts src tests",
Expand Down Expand Up @@ -40,6 +42,7 @@
"homepage": "https://github.com/huan/matrix-appservice-wechaty#readme",
"dependencies": {
"cuid": "^2.1.8",
"dotenv": "^10.0.0",
"matrix-appservice-bridge": "^2.4.1",
"read-pkg-up": "^7.0.1",
"update-notifier": "^5.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/wechaty-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export class WechatyManager extends Manager {
matrixConsumerId : string,
wechatyOptions? : WechatyOptions,
): Wechaty {
if (process.env.WECHATY_PUPPET_PUPPETEER_ENDPOINT) {
wechatyOptions = wechatyOptions || {}
wechatyOptions.puppetOptions = wechatyOptions.puppetOptions || {}
wechatyOptions.puppetOptions.endpoint = wechatyOptions.puppetOptions.endpoint || process.env.WECHATY_PUPPET_PUPPETEER_ENDPOINT
}
log.verbose('WechatyManager', 'create(%s, "%s")',
matrixConsumerId,
JSON.stringify(wechatyOptions),
Expand Down