@iamtrask/om-bridge 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bridge.js +6 -1
- package/package.json +1 -1
package/bridge.js
CHANGED
|
@@ -32,7 +32,11 @@ const jidMap = {}; // sender digits → full remoteJid
|
|
|
32
32
|
|
|
33
33
|
async function start() {
|
|
34
34
|
const { state, saveCreds } = await useMultiFileAuthState("./auth");
|
|
35
|
-
sock = makeWASocket({
|
|
35
|
+
sock = makeWASocket({
|
|
36
|
+
auth: state,
|
|
37
|
+
syncFullHistory: false,
|
|
38
|
+
logger: { info() {}, debug() {}, warn() {}, error: console.error, trace() {}, child() { return this; }, level: "error" }
|
|
39
|
+
});
|
|
36
40
|
sock.ev.on("creds.update", saveCreds);
|
|
37
41
|
|
|
38
42
|
sock.ev.on("connection.update", async ({ connection, lastDisconnect, qr }) => {
|
|
@@ -63,6 +67,7 @@ async function start() {
|
|
|
63
67
|
|| "";
|
|
64
68
|
if (!text) continue;
|
|
65
69
|
|
|
70
|
+
console.log("raw JID:", msg.key.remoteJid);
|
|
66
71
|
const sender = digits(msg.key.remoteJid);
|
|
67
72
|
jidMap[sender] = msg.key.remoteJid;
|
|
68
73
|
console.log(`← ${sender}: ${text}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamtrask/om-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The Open Mind — an AI auto-responder for WhatsApp. When someone texts you a message starting with \"om\", a local model replies on your behalf using only the files in that person's folder.",
|
|
5
5
|
"main": "bridge.js",
|
|
6
6
|
"bin": {
|