5
0
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:
Paul 2021-01-14 23:42:13 +01:00 committed by GitHub
parent 8fcd0f3b6f
commit b039da1eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {