fix job shops

This commit is contained in:
shoopea 2020-02-07 11:56:23 +08:00
parent 3a637bc684
commit 1cea32789d

6
job.go
View File

@ -2208,10 +2208,10 @@ func jobShops(j Job) {
out := fmt.Sprintf("Shop summary:\n")
for _, m := range p.Msgs {
rule, err := getMsgParsingRule(m)
rule, err := getMsgParsingRule(&m)
logOnError(err, "jobShopsSlave : getMsgParsingRule")
if rule.MsgTypeID64 == cacheObjSubType[`msg_shop_main_ack`] {
cwm, err := parseSubTypeMessageShopMainAck(m, rule.re)
cwm, err := parseSubTypeMessageShopMainAck(&m, rule.re)
logOnError(err, "jobShops : parseSubTypeMessageShopMainAck")
if cwm.Open {
out = fmt.Sprintf("%s ✔️", out)
@ -2220,7 +2220,7 @@ func jobShops(j Job) {
}
c := getObjCastle(cwm.CastleID64)
out = fmt.Sprintf("%s%s", out, c.Logo)
out = fmt.Sprintf("%s<a href=\"https://t.me/share/url?url=\/ws_%s\">%s</a>", out, cwm.Link, cwm.User)
out = fmt.Sprintf("%s<a href=\"https://t.me/share/url?url=\\/ws_%s\">%s</a>", out, cwm.Link, cwm.User)
out = fmt.Sprintf("%s [%d/%d]\n", out, cwm.Mana, cwm.ManaTotal)
}
clientDelTGMsg(m.TGUserID64, m.ID64, m.ChatID64)