Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bot_api_10_2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ func TestBotAPI102EphemeralSendParams(t *testing.T) {
document.ReceiverUserID, document.CallbackQueryID = 42, "callback"
photo := NewPhoto(1, FileID("photo"))
photo.ReceiverUserID, photo.CallbackQueryID = 42, "callback"
livePhoto := NewLivePhoto(1, FileID("live-photo"), FileID("photo"))
livePhoto.ReceiverUserID, livePhoto.CallbackQueryID = 42, "callback"
sticker := NewSticker(1, FileID("sticker"))
sticker.ReceiverUserID, sticker.CallbackQueryID = 42, "callback"
video := NewVideo(1, FileID("video"))
Expand All @@ -204,6 +206,7 @@ func TestBotAPI102EphemeralSendParams(t *testing.T) {
{method: "sendAudio", config: audio},
{method: "sendDocument", config: document},
{method: "sendPhoto", config: photo},
{method: "sendLivePhoto", config: livePhoto},
{method: "sendSticker", config: sticker},
{method: "sendVideo", config: video},
{method: "sendVideoNote", config: videoNote},
Expand Down
4 changes: 4 additions & 0 deletions configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ type SendLivePhotoConfig struct {
ParseMode string
CaptionEntities []MessageEntity
ShowCaptionAboveMedia bool
ReceiverUserID int64
CallbackQueryID string
}

func (config SendLivePhotoConfig) params() (Params, error) {
Expand All @@ -639,6 +641,8 @@ func (config SendLivePhotoConfig) params() (Params, error) {
params.AddNonEmpty("caption", config.Caption)
params.AddNonEmpty("parse_mode", config.ParseMode)
params.AddBool("show_caption_above_media", config.ShowCaptionAboveMedia)
params.AddNonZero64("receiver_user_id", config.ReceiverUserID)
params.AddNonEmpty("callback_query_id", config.CallbackQueryID)
if err = params.AddInterface("caption_entities", config.CaptionEntities); err != nil {
return params, err
}
Expand Down