From b860ea2858ad18e127f4e8056bb43cc7ba02db3a Mon Sep 17 00:00:00 2001 From: iyear Date: Mon, 2 Dec 2024 17:13:39 +0800 Subject: [PATCH] chore(tmedia): export extractMedia func --- core/tmedia/media.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/tmedia/media.go b/core/tmedia/media.go index 4a707d6..502bfcd 100644 --- a/core/tmedia/media.go +++ b/core/tmedia/media.go @@ -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) @@ -34,7 +34,7 @@ func GetMedia(msg tg.MessageClass) (*Media, bool) { return nil, false } - return extractMedia(media) + return ExtractMedia(media) } func GetExtendedMedia(mm tg.MessageExtendedMediaClass) (*Media, bool) { @@ -42,7 +42,7 @@ func GetExtendedMedia(mm tg.MessageExtendedMediaClass) (*Media, bool) { if !ok { return nil, false } - return extractMedia(m.Media) + return ExtractMedia(m.Media) } func GetDocumentThumb(doc *tg.Document) (*Media, bool) {