File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ class Telegram
50
50
* Constant for type Location
51
51
*/
52
52
const LOCATION = 'location ' ;
53
-
53
+ /**
54
+ * Constant for type Contact
55
+ */
56
+ const CONTACT = 'contact ' ;
57
+
54
58
private $ bot_id = "" ;
55
59
private $ data = array ();
56
60
private $ updates = array ();
@@ -1343,6 +1347,11 @@ public function Text()
1343
1347
return @$ this ->data ["message " ]["text " ];
1344
1348
}
1345
1349
1350
+ public function Caption ()
1351
+ {
1352
+ return @$ this ->data ["message " ]["caption " ];
1353
+ }
1354
+
1346
1355
/// Get the chat_id of the current message
1347
1356
/**
1348
1357
* \return the String users's chat_id
@@ -2027,6 +2036,9 @@ public function getUpdateType()
2027
2036
if (isset ($ update ['message ' ]['voice ' ])) {
2028
2037
return self ::VOICE ;
2029
2038
}
2039
+ if (isset ($ update ['message ' ]['contact ' ])) {
2040
+ return self ::CONTACT ;
2041
+ }
2030
2042
if (isset ($ update ['message ' ]['document ' ])) {
2031
2043
return self ::DOCUMENT ;
2032
2044
}
You can’t perform that action at this time.
0 commit comments