fix: handle images on telegraph server

This commit is contained in:
krau
2025-10-06 21:57:35 +08:00
parent c7a0076c15
commit 76a82a38ee

View File

@@ -223,6 +223,10 @@ func GetTphPicsFromMessageWithReply(ctx *ext.Context, update *ext.Update) (*type
}
if node.Tag == "img" {
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)
}
}