Commit 0e7c30e8 authored by Mrs4s's avatar Mrs4s

fix image error.

parent 0894f2ac
......@@ -367,12 +367,18 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
if group {
rsp, err := bot.Client.QueryGroupImage(1, hash, size)
if err != nil {
if url != "" {
return bot.ToElement(t, map[string]string{"file": url}, group)
}
return nil, err
}
return rsp, nil
}
rsp, err := bot.Client.QueryFriendImage(1, hash, size)
if err != nil {
if url != "" {
return bot.ToElement(t, map[string]string{"file": url}, group)
}
return nil, err
}
return rsp, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment