Add warning for stickers
This commit is contained in:
@@ -76,9 +76,10 @@ func (api *botAPI) hydrateMessage(msg *tgbotapi.Message) app.Message {
|
||||
}
|
||||
|
||||
return app.Message{
|
||||
Text: text,
|
||||
Image: api.hydrateImage(msg.Photo),
|
||||
Video: api.hydrateVideo(msg.Video),
|
||||
Text: text,
|
||||
Image: api.hydrateImage(msg.Photo),
|
||||
Video: api.hydrateVideo(msg.Video),
|
||||
Sticker: api.hydrateSticker(msg.Sticker),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +160,17 @@ func (api *botAPI) hydrateVideo(video *tgbotapi.Video) *app.Video {
|
||||
}
|
||||
}
|
||||
|
||||
func (api *botAPI) hydrateSticker(sticker *tgbotapi.Sticker) *app.Sticker {
|
||||
if sticker == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &app.Sticker{
|
||||
FileID: sticker.FileID,
|
||||
Emoji: sticker.Emoji,
|
||||
}
|
||||
}
|
||||
|
||||
func (api *botAPI) preparePhotos(message app.Message) []interface{} {
|
||||
photo := tgbotapi.NewInputMediaPhoto(tgbotapi.FileID(message.Image.FileID))
|
||||
photo.Caption = message.Text
|
||||
|
||||
Reference in New Issue
Block a user