fix job shops

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

8
job.go
View File

@ -2207,11 +2207,11 @@ func jobShops(j Job) {
logOnError(err, "jobShops : Unmarshal payload")
out := fmt.Sprintf("Shop summary:\n")
for _, m := range p.Msgs {
rule, err := getMsgParsingRule(m)
for _, m := range p.Msgs {
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)