-
Notifications
You must be signed in to change notification settings - Fork 9
chore(deps): bump whatsapp-rust-bridge #13
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
base: main
Are you sure you want to change the base?
Changes from all commits
11693c8
b68e142
7a88c3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,8 @@ | |
| * Compatibility wrapper for original Baileys chatModify API. | ||
| * Routes to the appropriate bridge method based on the modification type. | ||
| * | ||
| * Fully supported: archive, pin, mute, star, markRead, delete, deleteForMe, pushNameSetting | ||
| * Not yet in bridge (app-state patches): clear, contact, disableLinkPreviews, labels, quickReply | ||
| * Fully supported: archive, pin, mute, star, markRead, delete, deleteForMe, pushNameSetting, contact, clear | ||
| * Not yet in bridge (app-state patches): disableLinkPreviews, labels, quickReply | ||
|
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documentation claims are premature without bridge dependency update. The updated documentation marks 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| */ | ||
| chatModify: async (mod: ChatModification, jid: string) => { | ||
| const client = await ctx.getClient() | ||
|
|
@@ -45,9 +45,29 @@ | |
| await client.deleteMessageForMe(jid, mod.deleteForMe.key.id!, !!mod.deleteForMe.key.fromMe) | ||
| } else if ('pushNameSetting' in mod) { | ||
| await client.setPushName(mod.pushNameSetting) | ||
| } else if ('contact' in mod) { | ||
| // Save/rename a contact (syncs the name to linked devices). `jid` is the | ||
| // contact's bare PN jid. `contact: null` (removal) has no bridge/core path | ||
| // yet, so it is ignored. | ||
| if (mod.contact) { | ||
| await client.saveContact( | ||
|
Check failure on line 53 in src/Socket/chat-actions.ts
|
||
| jid, | ||
| mod.contact.fullName ?? undefined, | ||
| mod.contact.firstName ?? undefined, | ||
| mod.contact.saveOnPrimaryAddressbook ?? true | ||
| ) | ||
|
Comment on lines
+53
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the current bridge version in package.json and verify method availability
echo "=== Current bridge version in package.json ==="
cat package.json | jq -r '.dependencies["whatsapp-rust-bridge"]'
echo -e "\n=== Searching for saveContact usage in codebase ==="
rg -n "saveContact" --type ts
echo -e "\n=== Checking bridge type definitions ==="
fd -e d.ts -e ts "node_modules/whatsapp-rust-bridge" --exec cat {} \; | rg -A5 -B5 "saveContact|WasmWhatsAppClient" || echo "Bridge types not found or method not defined"Repository: oxidezap/baileyrs Length of output: 323 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== node_modules/whatsapp-rust-bridge existence ==="
if [ -d "node_modules/whatsapp-rust-bridge" ]; then
echo "node_modules/whatsapp-rust-bridge exists"
ls -la node_modules/whatsapp-rust-bridge | head
else
echo "node_modules/whatsapp-rust-bridge does NOT exist"
fi
echo -e "\n=== List lockfiles ==="
ls -ლა package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null || true
echo -e "\n=== Resolved bridge version from lockfile (best-effort) ==="
if [ -f "pnpm-lock.yaml" ]; then
rg -n "whatsapp-rust-bridge" pnpm-lock.yaml | head -n 20
elif [ -f "yarn.lock" ]; then
rg -n "whatsapp-rust-bridge" yarn.lock | head -n 20
elif [ -f "package-lock.json" ]; then
rg -n "whatsapp-rust-bridge" package-lock.json | head -n 20
else
echo "No lockfile found."
fi
echo -e "\n=== Search for WasmWhatsAppClient typings in repo (excluding node_modules) ==="
rg -n "WasmWhatsAppClient" --type ts --type d.ts --hidden -g'!**/node_modules/**' || true
echo -e "\n=== Search for saveContact in repo (excluding node_modules) ==="
rg -n "saveContact" --type ts --type d.ts --hidden -g'!**/node_modules/**' || trueRepository: oxidezap/baileyrs Length of output: 906 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== List lockfiles (correct flags) ==="
ls -la package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null || true
echo -e "\n=== Detect likely lockfile name(s) ==="
find . -maxdepth 2 -type f -name "*lock*" -print | head -n 50
# Determine which lockfile exists
LOCKFILE=""
if [ -f "pnpm-lock.yaml" ]; then LOCKFILE="pnpm-lock.yaml"; fi
if [ -f "yarn.lock" ] && [ -z "$LOCKFILE" ]; then LOCKFILE="yarn.lock"; fi
if [ -f "package-lock.json" ] && [ -z "$LOCKFILE" ]; then LOCKFILE="package-lock.json"; fi
echo -e "\n=== Using lockfile: ${LOCKFILE:-<none>} ==="
if [ -n "$LOCKFILE" ]; then
echo -e "\n=== Lines referencing whatsapp-rust-bridge in $LOCKFILE ==="
rg -n "whatsapp-rust-bridge" "$LOCKFILE" | head -n 80
fi
echo -e "\n=== Attempt to fetch/install package tarball contents (npm pack) ==="
# Best-effort: if network/npm is unavailable, this will fail and we’ll fall back to web_search later.
rm -rf /tmp/whatsapp-rust-bridge-tmp && mkdir -p /tmp/whatsapp-rust-bridge-tmp
cd /tmp/whatsapp-rust-bridge-tmp
npm pack whatsapp-rust-bridge@0.6.0-alpha.36 >/tmp/pack_stdout.txt 2>/tmp/pack_stderr.txt || true
echo "npm pack stderr (tail):"
tail -n 30 /tmp/pack_stderr.txt || true
TARBALL="$(ls -1 *.tgz 2>/dev/null | head -n 1 || true)"
echo -e "\nPacked tarball: ${TARBALL:-<none>}"
if [ -n "${TARBALL:-}" ]; then
tar -xzf "$TARBALL"
echo -e "\n=== Extracted package top-level ==="
ls -la | head
echo -e "\n=== Search extracted typings for WasmWhatsAppClient/saveContact ==="
rg -n "WasmWhatsAppClient|saveContact" . --hidden || true
echo -e "\n=== List .d.ts files that mention WasmWhatsAppClient ==="
rg -n --files-with-matches "WasmWhatsAppClient" . --hidden || true
fiRepository: oxidezap/baileyrs Length of output: 3106 🏁 Script executed: #!/bin/bash
set -euo pipefail
WORKDIR="/tmp/whatsapp-bridge-inspect-0.6.0-alpha.36"
rm -rf "$WORKDIR"
mkdir -p "$WORKDIR"
cd "$WORKDIR"
npm pack whatsapp-rust-bridge@0.6.0-alpha.36 >/tmp/pack2_stdout.txt 2>/tmp/pack2_stderr.txt || true
TARBALL="$(ls -1 *.tgz | head -n 1)"
tar -xzf "$TARBALL"
echo "=== Search for saveContact in extracted typings ==="
rg -n "saveContact" . || true
echo -e "\n=== Search for any 'save' methods on WasmWhatsAppClient (context) ==="
rg -n "interface WasmWhatsAppClient|class WasmWhatsAppClient|save[A-Za-z0-9_]*\\(" package/pkg/whatsapp_rust_bridge.d.ts || true
echo -e "\n=== If saveContact exists, show surrounding declaration ==="
# Print a small context block around any saveContact occurrences (if any)
if rg -n "saveContact" package/pkg/whatsapp_rust_bridge.d.ts >/dev/null 2>&1; then
rg -n -C 5 "saveContact" package/pkg/whatsapp_rust_bridge.d.ts
fiRepository: oxidezap/baileyrs Length of output: 320 Bridge method The call to 🧰 Tools🪛 GitHub Check: build[failure] 53-53: 🪛 GitHub Check: check-lint[failure] 53-53: 🪛 GitHub Check: run-tests[failure] 53-53: 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| } | ||
| } else if ('clear' in mod) { | ||
| // Clear a chat's messages while keeping the chat. `lastMessages` (the | ||
| // message range) is ignored, same as the `delete` branch — the bridge | ||
| // clears the whole chat. deleteStarred/deleteMedia aren't part of the | ||
| // Baileys `clear` shape, so default both to false (keep starred + media). | ||
| if (mod.clear) { | ||
| await client.clearChat(jid, false, false) | ||
|
Check failure on line 66 in src/Socket/chat-actions.ts
|
||
| } | ||
| } else { | ||
| // App-state-patch variants not yet exposed by bridge: | ||
| // clear, contact, disableLinkPreviews, addLabel, addChatLabel, | ||
| // disableLinkPreviews, addLabel, addChatLabel, | ||
| // removeChatLabel, addMessageLabel, removeMessageLabel, quickReply | ||
| const variant = Object.keys(mod)[0] | ||
| ctx.logger.warn( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,9 +211,9 @@ | |
| * Send a receipt for messages. The bridge handles most receipt types automatically | ||
| * (delivered, sender). Use `readMessages` for the common case of sending read receipts. | ||
| * | ||
| * Supported types via bridge: 'read', 'read-self' | ||
| * Supported types via bridge: 'read', 'read-self', 'played' | ||
| * Auto-handled by bridge: 'sender', 'inactive', undefined (delivered) | ||
| * Not supported: 'played', 'hist_sync', 'peer_msg' (logged as warning) | ||
| * Not supported: 'hist_sync', 'peer_msg' (logged as warning) | ||
| */ | ||
| sendReceipt: async (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => { | ||
| if (!messageIds.length) return | ||
|
|
@@ -225,9 +225,20 @@ | |
| ...(participant ? { participant } : {}) | ||
| })) | ||
| await (await ctx.getClient()).readMessages(keys) | ||
| } else if (type === 'played') { | ||
| // Voice/video-note played receipts. The bridge (and core) pick the wire | ||
| // type (`played` vs `played-self` for newsletters) and the `participant` | ||
| // attr from the chat jid, so we just hand over the keys — same shape as | ||
| // readMessages. | ||
| const keys = messageIds.map(id => ({ | ||
| remoteJid: jid, | ||
| id, | ||
| ...(participant ? { participant } : {}) | ||
| })) | ||
| await (await ctx.getClient()).markPlayed(keys) | ||
|
Check failure on line 238 in src/Socket/messages.ts
|
||
|
Comment on lines
+228
to
+238
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check for markPlayed method in bridge types
echo "=== Searching for markPlayed in codebase ==="
rg -n "markPlayed" --type ts
echo -e "\n=== Checking bridge type definitions for markPlayed ==="
fd -e d.ts -e ts "node_modules/whatsapp-rust-bridge" --exec cat {} \; | rg -A5 -B5 "markPlayed|readMessages" || echo "Method not found in bridge types"Repository: oxidezap/baileyrs Length of output: 340 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== node_modules/whatsapp-rust-bridge existence ==="
ls -la node_modules/whatsapp-rust-bridge 2>/dev/null || echo "node_modules/whatsapp-rust-bridge not present"
echo -e "\n=== Count of .d.ts files under bridge package ==="
if [ -d node_modules/whatsapp-rust-bridge ]; then
find node_modules/whatsapp-rust-bridge -name "*.d.ts" | wc -l
else
echo 0
fi
echo -e "\n=== Search for markPlayed in bridge package ==="
if [ -d node_modules/whatsapp-rust-bridge ]; then
rg -n "markPlayed" node_modules/whatsapp-rust-bridge --hidden --glob '!*node_modules/**/node_modules/*' || echo "No markPlayed symbol found"
else
echo "Skipping (bridge package missing)"
fi
echo -e "\n=== Search for readMessages / played receipt related symbols in bridge package ==="
if [ -d node_modules/whatsapp-rust-bridge ]; then
rg -n "readMessages|played|receipt" node_modules/whatsapp-rust-bridge --hidden --glob '!*node_modules/**/node_modules/*' | head -n 50 || echo "No related symbols found"
else
echo "Skipping (bridge package missing)"
fiRepository: oxidezap/baileyrs Length of output: 413 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Find WasmWhatsAppClient import/definition in repo ==="
rg -n "WasmWhatsAppClient" -S --hidden --glob '!.git/*' .
echo -e "\n=== Search for markPlayed in repo (all files) ==="
rg -n "markPlayed" -S --hidden --glob '!.git/*' .
echo -e "\n=== Search for readMessages / played receipt related methods ==="
rg -n "readMessages|played.*receipt|mark.*Played" -S --hidden --glob '!.git/*' src
echo -e "\n=== Inspect TypeScript client wrapper/type exports (candidate files) ==="
# Common patterns: bridge wrapper types might live near src/bridge or in a generated types folder.
ls -ლა src | head -n 200 || true
fd -e ts -e d.ts "WasmWhatsAppClient" -S src node_modules 2>/dev/null || trueRepository: oxidezap/baileyrs Length of output: 4307 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== src/Socket/messages.ts (context around readMessages/sendReceipt/sendReceipts) ==="
sed -n '170,310p' src/Socket/messages.ts | nl -ba
echo -e "\n=== src/Socket/types.ts ==="
sed -n '1,120p' src/Socket/types.ts | nl -ba
echo -e "\n=== src/Socket/index.ts (type alias usage) ==="
sed -n '1,80p' src/Socket/index.ts | nl -baRepository: oxidezap/baileyrs Length of output: 208 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== src/Socket/messages.ts (context around readMessages/sendReceipt/sendReceipts) ==="
sed -n '170,310p' src/Socket/messages.ts | cat -n
echo -e "\n=== src/Socket/types.ts ==="
sed -n '1,140p' src/Socket/types.ts | cat -n
echo -e "\n=== src/Socket/index.ts (type alias usage) ==="
sed -n '1,120p' src/Socket/index.ts | cat -nRepository: oxidezap/baileyrs Length of output: 12158 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== package.json ==="
cat package.json | rg -n "whatsapp-rust-bridge|dependencies|devDependencies" -n || true
echo -e "\n=== Full dependency lines mentioning whatsapp-rust-bridge (package-lock/yarn/pnpm) ==="
ls -la | rg -n "package-lock.json|yarn.lock|pnpm-lock.yaml" || true
rg -n "\"whatsapp-rust-bridge\"|whatsapp-rust-bridge" package-lock.json yarn.lock pnpm-lock.yaml 2>/dev/null || trueRepository: oxidezap/baileyrs Length of output: 884 🌐 Web query:
💡 Result: I couldn’t find any authoritative/public source that documents the symbol WasmWhatsAppClient.markPlayed specifically for whatsapp-rust-bridge version 0.6.0-alpha.36. The only clearly documented “markPlayed” function I found in the broader WhatsApp ecosystem is in the WPPConnect JS libraries (separate project), e.g. WPP.chat.markPlayed/WAJS.chat.markPlayed are exported there to mark a message as played [1][2]. What I did find about whatsapp-rust-bridge versions: - Public metadata I found for whatsapp-rust-bridge was for version 0.6.0-alpha.25 (not alpha.36) [3]. - I found the main whatsapp-rust-bridge GitHub repo, but the search results shown didn’t surface a 0.6.0-alpha.36 release tag/changelog entry nor the exact WasmWhatsAppClient.markPlayed method definition for that version [4]. For “markPlayed” behavior in WhatsApp clients generally, there is an upstream concept of sending a “played” receipt; for example, whatsmeow has code that uses receipt type “played” via MarkRead with ptt=true [5]. If you want, paste the repository link (or the generated WASM/TS bindings file) that contains WasmWhatsAppClient, or the relevant snippet from alpha.36, and I can map exactly what markPlayed does and how it’s wired to the underlying receipt/protocol for that specific release. Citations:
🌐 Web query:
💡 Result: I couldn’t find authoritative evidence that a symbol named Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== npm pack whatsapp-rust-bridge@0.6.0-alpha.36 ==="
rm -f /tmp/whatsapp-rust-bridge-*.tgz
if command -v npm >/dev/null 2>&1; then
npm pack whatsapp-rust-bridge@0.6.0-alpha.36 --silent
else
echo "npm not available"
exit 0
fi
TARBALL="$(ls -1 *.tgz 2>/dev/null | head -n 1 || true)"
if [ -z "${TARBALL:-}" ]; then
# maybe npm created in cwd with a name, but pattern might differ; search recursively in cwd
TARBALL="$(find . -maxdepth 2 -type f -name "whatsapp-rust-bridge-*.tgz" | head -n 1 || true)"
fi
echo -e "\nTarball: ${TARBALL:-<none>}"
if [ -z "${TARBALL:-}" ]; then
exit 0
fi
echo -e "\n=== Inspect tarball contents (look for d.ts / WasmWhatsAppClient / markPlayed) ==="
mkdir -p /tmp/bridge_inspect
tar -xzf "$TARBALL" -C /tmp/bridge_inspect
# Count and list declaration files
echo -e "\n-- .d.ts files --"
find /tmp/bridge_inspect -type f -name "*.d.ts" | wc -l
find /tmp/bridge_inspect -type f -name "*.d.ts" | head -n 50
echo -e "\n-- Search for WasmWhatsAppClient in package --"
rg -n "WasmWhatsAppClient" /tmp/bridge_inspect --hidden --no-ignore || echo "No WasmWhatsAppClient string found"
echo -e "\n-- Search for markPlayed in package declarations/runtime --"
rg -n "markPlayed" /tmp/bridge_inspect --hidden --no-ignore || echo "No markPlayed string found"
echo -e "\n-- Search for played receipt helpers (played/read) --"
rg -n "played.*receipt|receipt.*played|Read.*played|mark.*played|Played" /tmp/bridge_inspect --hidden --no-ignore | head -n 80 || trueRepository: oxidezap/baileyrs Length of output: 50374 🏁 Script executed: #!/bin/bash
set -euo pipefail
TAR_DIR="/tmp/bridge_inspect"
DTS="$TAR_DIR/package/pkg/whatsapp_rust_bridge.d.ts"
echo "=== Sanity: declaration file exists ==="
ls -ლა "$DTS" 2>/dev/null || (echo "missing $DTS"; exit 1)
echo -e "\n=== Methods containing 'read' in WasmWhatsAppClient declarations ==="
rg -n "readMessages|markRead|mark.*Read|played|mark.*Played|Receipt" "$DTS" | head -n 200
echo -e "\n=== Extract WasmWhatsAppClient interface section around readMessages ==="
LINE_READ=$(rg -n "readMessages" "$DTS" | head -n 1 | cut -d: -f1 || true)
if [ -n "${LINE_READ:-}" ]; then
START=$((LINE_READ-40))
END=$((LINE_READ+80))
sed -n "${START},${END}p" "$DTS" | nl -ba | head -n 200
else
echo "No readMessages found in $DTS"
fi
echo -e "\n=== Extract WasmWhatsAppClient class section around readMessages (if present) ==="
LINE_READ_C=$(rg -n "class WasmWhatsAppClient" "$DTS" | head -n 1 | cut -d: -f1 || true)
if [ -n "${LINE_READ_C:-}" ]; then
sed -n "${LINE_READ_C},$((LINE_READ_C+220))p" "$DTS" | nl -ba | head -n 220
fi
echo -e "\n=== Search for literal 'markPlayed' in d.ts only ==="
rg -n "markPlayed" "$DTS" || echo "markPlayed not present in d.ts"Repository: oxidezap/baileyrs Length of output: 167 🏁 Script executed: #!/bin/bash
set -euo pipefail
TARBALL="whatsapp-rust-bridge-0.6.0-alpha.36.tgz"
if [ ! -f "$TARBALL" ]; then
echo "Missing $TARBALL in cwd. Please re-run npm pack first."
exit 1
fi
rm -rf /tmp/bridge_inspect
mkdir -p /tmp/bridge_inspect
tar -xzf "$TARBALL" -C /tmp/bridge_inspect
echo "=== Dump candidate d.ts paths ==="
find /tmp/bridge_inspect -type f -name "*whatsapp_rust_bridge*.d.ts" -o -name "*.d.ts" | head -n 50
DTS="$(find /tmp/bridge_inspect -type f -name "whatsapp_rust_bridge.d.ts" | head -n 1 || true)"
if [ -z "${DTS:-}" ]; then
echo "Could not find whatsapp_rust_bridge.d.ts under /tmp/bridge_inspect"
exit 1
fi
echo -e "\nUsing: $DTS"
echo -e "\n=== Literal markPlayed occurrences in d.ts ==="
rg -n "markPlayed" "$DTS" || echo "markPlayed not present in d.ts"
echo -e "\n=== Receipt/played/read-related declarations (read/played/receipt) ==="
rg -n "readMessages|markRead|played|receipt|read.*self" "$DTS" | head -n 200
echo -e "\n=== Show WasmWhatsAppClient interface snippet around readMessages (if found) ==="
if rg -n "readMessages" "$DTS" >/dev/null; then
LINE_READ=$(rg -n "readMessages" "$DTS" | head -n 1 | cut -d: -f1)
START=$((LINE_READ-60))
END=$((LINE_READ+140))
sed -n "${START},${END}p" "$DTS" | cat -n
else
echo "No readMessages in d.ts"
fiRepository: oxidezap/baileyrs Length of output: 8376 🏁 Script executed: #!/bin/bash
set -euo pipefail
DTS="/tmp/bridge_inspect/package/pkg/whatsapp_rust_bridge.d.ts"
if [ ! -f "$DTS" ]; then
echo "Missing $DTS"
exit 1
fi
echo "=== Methods containing 'Played'/'played' in name ==="
rg -n "played" "$DTS" | head -n 80
echo -e "\n=== Methods containing 'mark' in name ==="
rg -n "mark[A-Za-z0-9_]*\\(" "$DTS" | head -n 120
echo -e "\n=== Lines mentioning 'readMessages' and surrounding receipt comments ==="
LINE=$(rg -n "readMessages\\(" "$DTS" | head -n 1 | cut -d: -f1)
if [ -n "${LINE:-}" ]; then
START=$((LINE-120))
END=$((LINE+140))
sed -n "${START},${END}p" "$DTS" | nl -ba | head -n 220
fiRepository: oxidezap/baileyrs Length of output: 416 🏁 Script executed: #!/bin/bash
set -euo pipefail
DTS="/tmp/bridge_inspect/package/pkg/whatsapp_rust_bridge.d.ts"
if [ ! -f "$DTS" ]; then
echo "Missing $DTS"
exit 1
fi
echo "=== Methods containing 'Receipt' ==="
rg -n "Receipt" "$DTS" | head -n 120
echo -e "\n=== Methods containing 'read' and 'receipt' keywords near each other ==="
rg -n "readMessages|played|receipt" "$DTS" | head -n 200
echo -e "\n=== Methods around readMessages declaration ==="
LINE=$(rg -n "readMessages\\(" "$DTS" | head -n 1 | cut -d: -f1 || true)
if [ -n "${LINE:-}" ]; then
START=$((LINE-80))
END=$((LINE+120))
sed -n "${START},${END}p" "$DTS" | cat -n | head -n 220
fi
echo -e "\n=== Methods containing 'mark' (case-insensitive) besides markChatAsRead ==="
rg -n -i "mark[A-Za-z0-9_]*\\(" "$DTS" | head -n 120Repository: oxidezap/baileyrs Length of output: 11274 Fix missing bridge API:
🧰 Tools🪛 GitHub Check: build[failure] 238-238: 🪛 GitHub Check: check-lint[failure] 238-238: 🪛 GitHub Check: run-tests[failure] 238-238: 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| } else { | ||
| // delivered/sender/inactive receipts are sent automatically by the Rust bridge | ||
| // played/hist_sync/peer_msg require bridge-side support | ||
| // hist_sync/peer_msg require bridge-side support | ||
| ctx.logger.debug( | ||
| { type, jid, count: messageIds.length }, | ||
| 'sendReceipt: type handled automatically by bridge or not yet supported' | ||
|
|
@@ -248,6 +259,13 @@ | |
| if (readKeys.length) { | ||
| await client.readMessages(readKeys) | ||
| } | ||
| } else if (type === 'played') { | ||
| const playedKeys = keys | ||
| .filter(k => !k.fromMe && k.remoteJid && k.id) | ||
| .map(k => ({ remoteJid: k.remoteJid!, id: k.id!, ...(k.participant ? { participant: k.participant } : {}) })) | ||
| if (playedKeys.length) { | ||
| await client.markPlayed(playedKeys) | ||
| } | ||
| } else { | ||
| ctx.logger.debug( | ||
| { type, count: keys.length }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Verification inconclusive
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 104
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 1403
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 104
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 104
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 105
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 104
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 13085
🏁 Script executed:
Repository: oxidezap/baileyrs
Length of output: 10937
🌐 Web query:
whatsapp-rust-bridge label_edit_update label_association_update💡 Result:
I couldn’t find any authoritative documentation or source code in whatsapp-rust-bridge (or its referenced variants) that defines the exact labels you provided: “label_edit_update” and “label_association_update”. The only relevant “label” items found were about WhatsApp label app-state syncing and unrelated “label*_update” identifiers in other ecosystems (e.g., HubSpot CRM association labels, Gmail API label updates), which appear to be different domains. What I can say from the sources: 1) whatsapp-rust-bridge is an ongoing Rust/WASM project, but the specific event/handler names “label_edit_update” and “label_association_update” are not surfaced in the material located by this search. 2) There is evidence that some WhatsApp stacks expose label app-state events/handlers in general (e.g., a PR titled “Forward WhatsApp label appstate events to webhooks”). However, it does not confirm those exact identifier strings. If you tell me where these strings appear (e.g., a particular repository path, a file name like constants.ts, protobuf field names, or a webhook payload example), I can do a targeted second pass to identify the precise mapping to whatsapp-rust-bridge’s API/event system.
Citations:
🌐 Web query:
whatsapp_rust_bridge.d.ts "label_edit_update"💡 Result:
I couldn’t find any source that mentions the symbol/label “label_edit_update” inside whatsapp_rust_bridge.d.ts (or anywhere else in the searched repositories/docs). The search results surfaced the package/type definition files’ presence (e.g., a generated whatsapp_rust_bridge.d.ts under a published npm package), but not the specific string “label_edit_update”. If you can share either (a) the exact npm package name/version that contains whatsapp_rust_bridge.d.ts, or (b) paste the contents of whatsapp_rust_bridge.d.ts (or at least the section around where you expect “label_edit_update”), I can pinpoint whether that member exists, what its TypeScript type is, and where it maps in Rust/wasm.
Citations:
Bridge adapter keys likely don’t exist in
whatsapp-rust-bridge’sWhatsAppEvent['type']union (TS2353).src/Bridge/schema.tsaddsADAPTERS.label_edit_updateandADAPTERS.label_association_update(lines 294-316), butADAPTERSis typed assatisfies AdapterMapwhereAdapterMapis keyed byWhatsAppEvent['type']. If the installedwhatsapp-rust-bridgetypings don’t include these exact discriminator strings inwhatsapp_rust_bridge.d.ts, the build will fail (TS2353 / related type errors).Check
node_modules/whatsapp-rust-bridge/pkg/whatsapp_rust_bridge.d.tsforlabel_edit_updateandlabel_association_update. If missing, bump/pinwhatsapp-rust-bridgeso the union includes them and updatepackage-lock.json(the lockfile contains entries for both0.6.0-alpha.36and0.5.4). Otherwise, temporarily gate these adapters until the dependency version used in CI exports the required event types.🧰 Tools
🪛 GitHub Actions: Build Project / 0_build.txt
[error] 294-294: TypeScript compilation failed (tsc). TS2353: Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Actions: Build Project / build
[error] 294-294: TypeScript (TS2353) build failed. Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Actions: Linting Check / 0_check-lint.txt
[error] 294-294: TypeScript build failed (tsc). TS2353: Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Actions: Linting Check / check-lint
[error] 294-294: TypeScript (tsc) error TS2353: Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Actions: Run Tests / 0_run-tests.txt
[error] 294-294: TypeScript error TS2353: Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'. The build command 'tsc -P tsconfig.build.json' failed.
🪛 GitHub Actions: Run Tests / run-tests
[error] 294-294: TypeScript (tsc) error TS2353: Object literal may only specify known properties. Property 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Check: build
[failure] 310-310:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Check: check-lint
[failure] 310-310:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🪛 GitHub Check: run-tests
[failure] 310-310:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Parameter 'data' implicitly has an 'any' type.
[failure] 294-294:
Object literal may only specify known properties, and 'label_edit_update' does not exist in type 'AdapterMap'.
🤖 Prompt for AI Agents