Skip to content

Commit

Permalink
include chat id in captions
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed Aug 20, 2017
1 parent a0df0cd commit 2c141b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handlers/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func (h *handler) SendMsg(msg courier.Msg) (courier.MsgStatus, error) {
switch strings.Split(mediaType, "/")[0] {
case "image":
form := url.Values{
"chat_id": []string{msg.URN().Path()},
"photo": []string{mediaURL},
"caption": []string{caption},
}
Expand All @@ -190,6 +191,7 @@ func (h *handler) SendMsg(msg courier.Msg) (courier.MsgStatus, error) {

case "video":
form := url.Values{
"chat_id": []string{msg.URN().Path()},
"video": []string{mediaURL},
"caption": []string{caption},
}
Expand All @@ -200,6 +202,7 @@ func (h *handler) SendMsg(msg courier.Msg) (courier.MsgStatus, error) {

case "audio":
form := url.Values{
"chat_id": []string{msg.URN().Path()},
"audio": []string{mediaURL},
"caption": []string{caption},
}
Expand Down

0 comments on commit 2c141b9

Please sign in to comment.