Skip to content
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

群text类型消息包含:\n时消息被截断 #75

Open
hmllsnow opened this issue Mar 22, 2024 · 2 comments
Open

群text类型消息包含:\n时消息被截断 #75

hmllsnow opened this issue Mar 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hmllsnow
Copy link

当群text类型消息包含:\n时,消息被截断。
检查可能是wechat4u/schema-mapper/message/message-parser-room.ts类中,
可能是消息内容处理存在问题
const parts = webMessageRawPayload.Content.split(':\n')
if (parts.length > 1) {
text = parts[1]
} else {
text = webMessageRawPayload.Content
}

@huan
Copy link
Member

huan commented Mar 22, 2024

Good catch! I would love to accept a PR with Unit Test to fix it!

@huan huan added the bug Something isn't working label Mar 22, 2024
@Nimbly8836
Copy link

The possible solution I discovered.
const split = content.split(/^.+:\n/)
Including the function roomMessageSentBySelf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants