Commit 2dca0a3e authored by Mrs4s's avatar Mrs4s

fix #35

parent 053d62ff
...@@ -197,6 +197,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message. ...@@ -197,6 +197,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
if err != nil { if err != nil {
return nil, err return nil, err
} }
if path.Ext(path.Join(global.IMAGE_PATH, f)) != ".image" {
return message.NewImage(b), nil
}
if len(b) < 20 { if len(b) < 20 {
return nil, errors.New("invalid local file") return nil, errors.New("invalid local file")
} }
......
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