Skip to content

feat: bot.call 支持 playMedia——拨打并接通后自动播放媒体 - #127

Merged
hcfw007 merged 2 commits into
mainfrom
feat/media-ws-contract
Aug 26, 2026
Merged

feat: bot.call 支持 playMedia——拨打并接通后自动播放媒体#127
hcfw007 merged 2 commits into
mainfrom
feat/media-ws-contract

Conversation

@hcfw007

@hcfw007 hcfw007 commented Aug 26, 2026

Copy link
Copy Markdown
Member

背景

配套 juzibot/wechaty-grpc#78 / wechaty-puppet#115 / wechaty-puppet-service#102。设计文档 §8:https://juzihudong.feishu.cn/docx/N5nVd5B7Bo2vYtxlQD3cU83enKc

改动

  • bot.call(contacts, options) 扩展 playMedia{ file?, hangupOnFinish?, hangupDelayMs? }:未传时原 callInvite 路径一字不动;传入时校验(Video 显式传入抛错;file 空且未 hangupOnFinish 抛错)后走 puppet.callInviteWithMedia
  • Call 孵化尾段抽 __incubateOutgoingCall(双下划线约定,不泄漏公共接口),两路径共用
  • verbose 日志改脱敏视图(stream 型 FileBox 的 toJSON 会抛,原样 stringify 会崩日志行;无 playMedia 时输出逐字节不变)
  • call.spec 新增 4 条分派/校验用例

验证

build/dist 0 错;lint 四段全过;tap 32/33(唯一失败 io.spec.ts 为既存环境性失败,干净树复跑同样失败)。

注:contact.call() 的 1v1 语法糖未扩散 playMedia(独立内联类型),下游需要时再补。

@hcfw007

hcfw007 commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

cursor review

@hcfw007
hcfw007 force-pushed the feat/media-ws-contract branch from 30e4fc0 to 254c4c1 Compare August 26, 2026 04:04
@hcfw007
hcfw007 merged commit a90c27a into main Aug 26, 2026
10 checks passed
@hcfw007
hcfw007 deleted the feat/media-ws-contract branch August 26, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant