mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 08:29:25 +01:00
Add more debug info (telegram)
This commit is contained in:
parent
64c542e614
commit
95d4dcaeb3
@ -247,7 +247,6 @@ func (b *Btelegram) handleDownload(file interface{}, msg *config.Message) {
|
|||||||
url = b.getFileDirectURL(photos[len(photos)-1].FileID)
|
url = b.getFileDirectURL(photos[len(photos)-1].FileID)
|
||||||
name = "photo"
|
name = "photo"
|
||||||
text = " " + url
|
text = " " + url
|
||||||
fileid = v.FileID
|
|
||||||
case *tgbotapi.Document:
|
case *tgbotapi.Document:
|
||||||
size = v.FileSize
|
size = v.FileSize
|
||||||
url = b.getFileDirectURL(v.FileID)
|
url = b.getFileDirectURL(v.FileID)
|
||||||
@ -267,7 +266,7 @@ func (b *Btelegram) handleDownload(file interface{}, msg *config.Message) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
flog.Errorf("download %s failed %#v", url, err)
|
flog.Errorf("download %s failed %#v", url, err)
|
||||||
} else {
|
} else {
|
||||||
flog.Debugf("download OK %#v %#v %#v", name, len(data), len(url))
|
flog.Debugf("download OK %#v %#v %#v", name, len(*data), len(url))
|
||||||
msg.Extra["file"] = append(msg.Extra["file"], config.FileInfo{Name: name, Data: data})
|
msg.Extra["file"] = append(msg.Extra["file"], config.FileInfo{Name: name, Data: data})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user