mirror of
https://github.com/yincongcyincong/wechat_chatter.git
synced 2026-07-15 10:26:52 +08:00
update script
This commit is contained in:
+8
-2
@@ -1122,14 +1122,20 @@ function setReceiver() {
|
||||
}
|
||||
}
|
||||
|
||||
senderUser = content.substring(0, splitIndex).trim();
|
||||
const sendUserStart = content.indexOf('wxid_')
|
||||
senderUser = content.substring(sendUserStart, splitIndex).trim();
|
||||
|
||||
messages = [];
|
||||
const parts = content.split('\u2005');
|
||||
for (let part of parts) {
|
||||
part = part.trim();
|
||||
if (!part.startsWith("@")) {
|
||||
messages.push({type: "text", data: {text: part}});
|
||||
if (part.indexOf(":") !== -1) {
|
||||
messages.push({type: "text", data: {text: part.substring(part.indexOf(':') + 1)}});
|
||||
} else {
|
||||
messages.push({type: "text", data: {text: part}});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user