You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
453 B
22 lines
453 B
3 years ago
|
package message
|
||
|
|
||
|
import "github.com/gotd/td/tg"
|
||
|
|
||
|
// FileLocation is an abstraction of Telegram file location.
|
||
|
type FileLocation interface {
|
||
|
GetID() (value int64)
|
||
|
GetAccessHash() (value int64)
|
||
|
GetFileReference() (value []byte)
|
||
|
}
|
||
|
|
||
|
func inputDocuments(files ...FileLocation) (r []tg.InputDocumentClass) {
|
||
|
r = make([]tg.InputDocumentClass, len(files))
|
||
|
for i := range files {
|
||
|
v := new(tg.InputDocument)
|
||
|
v.FillFrom(files[i])
|
||
|
r[i] = v
|
||
|
}
|
||
|
|
||
|
return
|
||
|
}
|