Skip to content

Commit

Permalink
chore(tmedia): export extractMedia func
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Dec 2, 2024
1 parent 3cac28d commit b860ea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tmedia/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Media struct {
DC int
}

func extractMedia(m tg.MessageMediaClass) (*Media, bool) {
func ExtractMedia(m tg.MessageMediaClass) (*Media, bool) {
switch m := m.(type) {
case *tg.MessageMediaPhoto:
return GetPhotoInfo(m)
Expand All @@ -34,15 +34,15 @@ func GetMedia(msg tg.MessageClass) (*Media, bool) {
return nil, false
}

return extractMedia(media)
return ExtractMedia(media)
}

func GetExtendedMedia(mm tg.MessageExtendedMediaClass) (*Media, bool) {
m, ok := mm.(*tg.MessageExtendedMedia)
if !ok {
return nil, false
}
return extractMedia(m.Media)
return ExtractMedia(m.Media)
}

func GetDocumentThumb(doc *tg.Document) (*Media, bool) {
Expand Down

0 comments on commit b860ea2

Please sign in to comment.