Skip to content

Commit 46cab5c

Browse files
authored
Merge pull request #241 from amirrez-a/patch-2
Add Callback_FromID() function
2 parents d5464bc + da96b6a commit 46cab5c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Telegram.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ public function Callback_Message()
18961896
return $this->data['callback_query']['message'];
18971897
}
18981898

1899-
/// Get the Get the chati_id of the current callback
1899+
/// Get the Get the chat_id of the current callback
19001900

19011901
/**
19021902
* \deprecated Use ChatId() instead
@@ -1906,6 +1906,17 @@ public function Callback_ChatID()
19061906
{
19071907
return $this->data['callback_query']['message']['chat']['id'];
19081908
}
1909+
1910+
/// Get the Get the from_id of the current callback
1911+
1912+
/**
1913+
* \return the String callback_query from_id.
1914+
*/
1915+
public function Callback_FromID()
1916+
{
1917+
return $this->data['callback_query']['from']['id'];
1918+
}
1919+
19091920

19101921
/// Get the date of the current message
19111922

0 commit comments

Comments
 (0)