This commit is contained in:
Darren Clarke 2023-07-18 12:26:57 +00:00
parent 7ca5f2d45a
commit f901f203b0
302 changed files with 9897 additions and 10332 deletions

View file

@ -6,7 +6,6 @@
"author": "Abel Luck <abel@guardianproject.info>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@adiwajshing/baileys": "5.0.0",
"@adiwajshing/keyed-db": "0.2.4",
"@digiresilience/hapi-nextauth": "*",
"@digiresilience/hapi-pg-promise": "*",
@ -30,20 +29,21 @@
"graphile-worker": "^0.13.0",
"hapi-auth-bearer-token": "^8.0.0",
"hapi-auth-jwt2": "^10.4.0",
"hapi-swagger": "^17.0.0",
"hapi-swagger": "^17.1.0",
"joi": "^17.9.2",
"jsonwebtoken": "^9.0.0",
"jsonwebtoken": "^9.0.1",
"jwks-rsa": "^3.0.1",
"long": "^5.2.3",
"p-memoize": "^7.1.1",
"pg": "^8.11.0",
"pg": "^8.11.1",
"pg-monitor": "^2.0.0",
"pg-promise": "^11.5.0",
"postgraphile": "4.13.0",
"postgraphile": "4.12.3",
"postgraphile-plugin-connection-filter": "^2.3.0",
"remeda": "^1.19.0",
"twilio": "^4.12.0",
"typeorm": "^0.3.17"
"remeda": "^1.24.0",
"twilio": "^4.14.0",
"typeorm": "^0.3.17",
"@whiskeysockets/baileys": "^6.3.1"
},
"devDependencies": {
"@types/long": "^4.0.2",
@ -52,14 +52,14 @@
"camelcase-keys": "^8.0.2",
"eslint-config-link": "*",
"jest-config-link": "*",
"nodemon": "^2.0.22",
"nodemon": "^3.0.1",
"pg-monitor": "^2.0.0",
"pino-pretty": "^10.0.0",
"pino-pretty": "^10.0.1",
"ts-node": "^10.9.1",
"tsc-watch": "^6.0.4",
"tsconfig-link": "*",
"typedoc": "^0.24.8",
"typescript": "^5.1.3"
"typescript": "^5.1.6"
},
"nodemonConfig": {
"ignore": [

View file

@ -11,17 +11,16 @@ import makeWASocket, {
fetchLatestBaileysVersion,
isJidBroadcast,
isJidStatusBroadcast,
MessageRetryMap,
useMultiFileAuthState,
} from "@adiwajshing/baileys";
} from "@whiskeysockets/baileys";
import fs from "fs";
import workerUtils from "../../worker-utils.js";
export type AuthCompleteCallback = (error?: string) => void;
export default class WhatsappService extends Service {
connections: { [key: string]: any } = {};
loginConnections: { [key: string]: any } = {};
connections: { [key: string]: any; } = {};
loginConnections: { [key: string]: any; } = {};
static browserDescription: [string, string, string] = [
"Metamigo",
@ -69,7 +68,7 @@ export default class WhatsappService extends Service {
) {
const directory = this.getAuthDirectory(bot);
const { state, saveCreds } = await useMultiFileAuthState(directory);
const msgRetryCounterMap: MessageRetryMap = {};
const msgRetryCounterMap: any = {};
const socket = makeWASocket({
...options,
auth: state,