This commit is contained in:
shoopea 2020-01-16 23:27:14 +08:00
parent b866c92bd5
commit 36891b94d8

7
job.go
View File

@ -1587,11 +1587,6 @@ func jobGWithdraw(j Job) {
c.Encrypt(out, in) c.Encrypt(out, in)
ref := hex.EncodeToString(out) ref := hex.EncodeToString(out)
var userid string
userid = fmt.Sprintf("%d", p.UserID64)
user, err := bot.ChatByID(userid)
logOnError(err, "jobGWithdraw : ChatByID")
var stock string var stock string
for _, i := range p.Items { for _, i := range p.Items {
if i.Available > i.Required { if i.Available > i.Required {
@ -1601,7 +1596,7 @@ func jobGWithdraw(j Job) {
} }
} }
msg := fmt.Sprintf("To validate @%s withdrawal of<code>%s</code>\nClick /withdraw_%s", user.Username, stock, string(ref)) msg := fmt.Sprintf("To validate @%s withdrawal of<code>%s</code>\nClick /withdraw_%s", p.User, stock, string(ref))
cmd := TGCommand{ cmd := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,