GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(cp): 添加企业微信会话存档音视频通话(voiptext)消息类型支持 by Copilot · Pull Request #3779 · binarywang/WxJava

Conversation

Copilot AI commented Nov 28, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

企业微信会话存档功能缺少对音视频通话消息类型 voiptext 的支持。根据官方文档添加该消息类型的数据模型。

修改内容

  • 在 WxCpChatModel 中添加 voiptext 字段
  • 新增 VoipText 内部类,包含:
    • callDuration - 通话时长
    • inviteType - 邀请类型 (1: 用户主动发起, 2: 群主发起)

使用示例

WxCpChatModel chatModel = WxCpChatModel.fromJson(decryptedJson);
if ("voiptext".equals(chatModel.getMsgType())) {
    WxCpChatModel.VoipText voipText = chatModel.getVoipText();
    Integer duration = voipText.getCallDuration();
    Integer inviteType = voipText.getInviteType();
}
Original prompt

This section details on the original issue you should resolve

<issue_title>企业微信会话存档功能 未接收消息类型为视频通话的类型</issue_title>
<issue_description>

简要描述

企业微信会话存档功能 未接收消息类型为视频通话的类型
文档链接为:https://developer.work.weixin.qq.com/document/path/91361#%E9%9F%B3%E8%A7%86%E9%A2%91%E9%80%9A%E8%AF%9D

  • WxJava 模块名: weixin-java-cp
  • WxJava 版本号:4.7.0

详细描述

Image

Comments on the Issue (you are @copilot in this section)

@binarywang 欢迎提供PR代码来支持

Custom agent used: 自定义的
需要用中文

  • Fixes 企业微信会话存档功能 未接收消息类型为视频通话的类型 #3598

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Initial plan
0dee796
Copilot AI assigned Copilot and binarywang Nov 28, 2025
Copilot started work on behalf of binarywang November 28, 2025 13:48
View session
@binarywang
feat(cp): 添加企业微信会话存档音视频通话(voiptext)消息类型支持
6e205af
Co-authored-by: binarywang <[email protected]>
Copilot AI changed the title [WIP] Fix missing video call message type in WeChat archiving feat(cp): 添加企业微信会话存档音视频通话(voiptext)消息类型支持 Nov 28, 2025
Copilot AI requested a review from binarywang November 28, 2025 13:55
Copilot finished work on behalf of binarywang November 28, 2025 13:55
@binarywang binarywang added this to the 4.8.0 milestone Dec 2, 2025
@binarywang
binarywang marked this pull request as ready for review December 4, 2025 11:41
Copilot AI review requested due to automatic review settings December 4, 2025 11:41
Copilot started reviewing on behalf of binarywang December 4, 2025 11:42
View session
@binarywang
binarywang merged commit 4e46486 into develop Dec 4, 2025
4 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@binarywang
binarywang deleted the copilot/fix-video-call-message-type branch December 4, 2025 11:43
Copilot finished reviewing on behalf of binarywang December 4, 2025 11:45
Copilot AI reviewed Dec 4, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

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.

Pull request overview

此 PR 为企业微信会话存档功能添加了音视频通话消息类型 voiptext 的支持,填补了该消息类型在 SDK 中的空白。根据企业微信官方文档的要求,实现了该消息类型的数据模型。

主要变更:

  • 在 WxCpChatModel 中添加 voiptext 字段映射
  • 新增 VoipText 内部类,包含 callDuration(通话时长)和 inviteType(邀请类型)两个字段
  • 遵循了现有代码的风格和结构模式,包括 fromJson 和 toJson 方法

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java
Comment on lines +1349 to +1352

@SerializedName("callduration")
private Integer callDuration;

Copilot AI Dec 4, 2025

Copy link

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.

建议为 callDuration 和 inviteType 字段添加 Javadoc 注释,说明其具体含义和值的说明。例如:

  • callDuration: 通话时长(单位:秒)
  • inviteType: 邀请类型(1-用户主动发起, 2-群主发起)

参考同文件中其他字段的文档风格,如 Details.id 和 Meeting.meetingId 都有类似的注释说明。

Suggested change
@SerializedName("callduration")
private Integer callDuration;
/**
* 通话时长(单位:秒)
*/
@SerializedName("callduration")
private Integer callDuration;
/**
* 邀请类型(1-用户主动发起,2-群主发起)
*/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/msgaudit/WxCpChatModel.java
Comment on lines +1347 to +1375
public static class VoipText implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;

@SerializedName("callduration")
private Integer callDuration;

@SerializedName("invitetype")
private Integer inviteType;

/**
* From json voip text.
*
* @param json the json
* @return the voip text
*/
public static VoipText fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, VoipText.class);
}

/**
* To json string.
*
* @return the string
*/
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}

}

Copilot AI Dec 4, 2025

Copy link

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.

新增的 VoipText 消息类型缺少测试用例。建议在 WxCpMsgAuditTest.java 中添加 voiptext 消息类型的测试用例,以保持与其他消息类型一致的测试覆盖率。

可以参考同文件中其他消息类型的测试方式,例如 modelMeetingVoiceCall、modelSphFeed 等的测试实现。

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@binarywang binarywang Awaiting requested review from binarywang

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@binarywang binarywang

Copilot code review Copilot

Labels

None yet

Projects

None yet

Milestone

4.8.0

Development

Successfully merging this pull request may close these issues.

企业微信会话存档功能 未接收消息类型为视频通话的类型

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@binarywang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.