1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix decode error.

This commit is contained in:
Mrs4s 2020-12-02 22:04:58 +08:00
parent a407d93453
commit 0eb4eb738d

View File

@ -426,8 +426,11 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement {
if content != "" {
if elem.RichMsg.GetServiceId() == 35 {
reg := regexp.MustCompile(`m_resid="(\w+?.*?)"`)
res = append(res, &ForwardElement{ResId: reg.FindAllStringSubmatch(content, -1)[0][1]})
continue
sub := reg.FindAllStringSubmatch(content, -1)
if len(sub) > 0 && len(sub[0]) > 1 {
res = append(res, &ForwardElement{ResId: reg.FindAllStringSubmatch(content, -1)[0][1]})
continue
}
}
if elem.RichMsg.GetServiceId() == 33 {
continue // 前面一个 elem 已经解析到链接