Skip to content

fix(channel.wecom): inbound mixed msg parse - #3161

Merged
Re-bin merged 4 commits into
HKUDS:mainfrom
dzydzydzy7:main
Apr 15, 2026
Merged

Re-bin merged 4 commits into
HKUDS:mainfrom
dzydzydzy7:main

Conversation

@dzydzydzy7

@dzydzydzy7 dzydzydzy7 commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

I found that wecom's mixed text and image messages are not being processed correctly by nanobot because the message structure is not parsed correctly.

See the wecom documentation for reference: https://developer.work.weixin.qq.com/document/path/100719#%E5%9B%BE%E6%96%87%E6%B7%B7%E6%8E%92%E6%B6%88%E6%81%AF

So I fixed that. And It works well on my mac book

@dzydzydzy7 dzydzydzy7 changed the title Fix wecom mix msg parse fix(channel.wecom) mix inbound msg parse Apr 15, 2026
@dzydzydzy7 dzydzydzy7 changed the title fix(channel.wecom) mix inbound msg parse fix(channel.wecom) inbound mixed msg parse Apr 15, 2026
@dzydzydzy7 dzydzydzy7 changed the title fix(channel.wecom) inbound mixed msg parse fix(channel.wecom): inbound mixed msg parse Apr 15, 2026
@chengyongru

Copy link
Copy Markdown
Collaborator

Nice PR! Could you add some unit tests to prevent regression?

@chengyongru chengyongru added bug Something isn't working channel labels Apr 15, 2026
@dzydzydzy7

Copy link
Copy Markdown
Contributor Author

I added a unit test to tests/channels/test_wecom_channel.py

@chengyongru chengyongru left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chengyongru

chengyongru commented Apr 15, 2026 •

Copy link
Copy Markdown
Collaborator

I added a unit test to tests/channels/test_wecom_channel.py
Hi , it looks like CI failed

test_process_mixed_message 

see: https://github.com/HKUDS/nanobot/actions/runs/24444194871/job/71416713857?pr=3161

@dzydzydzy7

Copy link
Copy Markdown
Contributor Author

Unit tests already passed.

@Re-bin
Re-bin merged commit 6829b8b into HKUDS:main Apr 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working channel valid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants