mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-10 23:12:28 +08:00
fix: handle images on telegraph server
This commit is contained in:
@@ -223,6 +223,10 @@ func GetTphPicsFromMessageWithReply(ctx *ext.Context, update *ext.Update) (*type
|
|||||||
}
|
}
|
||||||
if node.Tag == "img" {
|
if node.Tag == "img" {
|
||||||
if src, ok := node.Attrs["src"]; ok {
|
if src, ok := node.Attrs["src"]; ok {
|
||||||
|
if strings.HasPrefix(src, "/file/") {
|
||||||
|
// handle images on telegra.ph server
|
||||||
|
src = "https://telegra.ph" + src
|
||||||
|
}
|
||||||
imgs = append(imgs, src)
|
imgs = append(imgs, src)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user