tomatrix: bridge live photos as videos

This commit is contained in:
Tulir Asokan
2026-04-01 21:13:44 +03:00
parent 770b3b8d8c
commit a44cc41933
3 changed files with 61 additions and 14 deletions
+6
View File
@@ -225,6 +225,12 @@ func (t *Transferer) WithDocument(doc tg.DocumentClass, thumbnail bool) *ReadyTr
return &ReadyTransferer{t, &documentFileLocation}
}
func (t *Transferer) WithLivePhoto(pc tg.PhotoClass, doc tg.DocumentClass) *ReadyTransferer {
photo := pc.(*tg.Photo)
t.fileInfo.Width, t.fileInfo.Height, _, _ = getLargestPhotoSize(photo.GetSizes())
return t.WithDocument(doc, false)
}
// WithPhoto transforms a [Transferer] to a [ReadyTransferer] by setting the
// given photo as the location that will be downloaded by the
// [ReadyTransferer].