mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-25 23:41:35 +00:00
Add jpe as valid image filename extension (telegram) (#1360)
This commit is contained in:
parent
8fcd0f3b6f
commit
b039da1eba
@ -389,7 +389,7 @@ func (b *Btelegram) handleUploadFile(msg *config.Message, chatid int64) string {
|
|||||||
Name: fi.Name,
|
Name: fi.Name,
|
||||||
Bytes: *fi.Data,
|
Bytes: *fi.Data,
|
||||||
}
|
}
|
||||||
re := regexp.MustCompile(".(jpg|png)$")
|
re := regexp.MustCompile(".(jpg|jpe|png)$")
|
||||||
if re.MatchString(fi.Name) {
|
if re.MatchString(fi.Name) {
|
||||||
c = tgbotapi.NewPhotoUpload(chatid, file)
|
c = tgbotapi.NewPhotoUpload(chatid, file)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user