Skip to content

Commit aa720ae

Browse files
authored
Edit in messageFromGroup
This variant is more useful, because messageFromGroup return true, if response type - callback (in private chat)
1 parent 836c3bb commit aa720ae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Telegram.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,10 +1528,10 @@ public function FromChatID()
15281528
*/
15291529
public function messageFromGroup()
15301530
{
1531-
if ($this->data["message"]["chat"]["type"] == "private") {
1532-
return false;
1533-
}
1534-
return true;
1531+
if ($this->getUpdateType() == self::CALLBACK_QUERY)
1532+
return (!$this->data["callback_query"]["message"]["chat"]["type"] == "private");
1533+
1534+
return (!$this->data["message"]["chat"]["type"] == "private");
15351535
}
15361536

15371537
/// Get the title of the group chat
@@ -2083,4 +2083,4 @@ function curl_file_create($filename, $mimetype = '', $postname = '') {
20832083
. ($postname ? : basename($filename))
20842084
. ($mimetype ? ";type=$mimetype" : '');
20852085
}
2086-
}
2086+
}

0 commit comments

Comments
 (0)