Skip to content

Commit ae64eeb

Browse files
authored
Fix caption
See issue #193
1 parent f9a0c77 commit ae64eeb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Telegram.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,11 @@ public function Text()
17711771

17721772
public function Caption()
17731773
{
1774-
return @$this->data['message']['caption'];
1774+
$type = $this->getUpdateType();
1775+
if ($type == self::CHANNEL_POST) {
1776+
return @$this->data['channel_post']['caption'];
1777+
}
1778+
return @$this->data['message']['caption'];
17751779
}
17761780

17771781
/// Get the chat_id of the current message

0 commit comments

Comments
 (0)