@@ -102,7 +102,7 @@ public function getLastUpdateId(): ?int
102
102
*/
103
103
public function getMessage (): ?object
104
104
{
105
- if (!isset ($ customs ['message ' ])) {
105
+ if (!isset ($ this -> customs ['message ' ])) {
106
106
$ this ->customs ['message ' ] = $ this ->data ->message ??
107
107
$ this ->data ->edited_message ??
108
108
$ this ->data ->channel_post ??
@@ -121,8 +121,8 @@ public function getMessage(): ?object
121
121
*/
122
122
public function getChat (): ?object
123
123
{
124
- if (!isset ($ customs ['chat ' ])) {
125
- $ this ->customs ['chat ' ] = $ this ->customs [ ' chat ' ] ->chat ??
124
+ if (!isset ($ this -> customs ['chat ' ])) {
125
+ $ this ->customs ['chat ' ] = $ this ->getMessage () ->chat ??
126
126
$ this ->data ->callback_query ->message ->chat ??
127
127
$ this ->data ->my_chat_member ->chat ??
128
128
$ this ->data ->chat_member ->chat ??
@@ -140,10 +140,10 @@ public function getChat(): ?object
140
140
*/
141
141
public function getUser (): ?object
142
142
{
143
- if (!isset ($ customs ['user ' ])) {
143
+ if (!isset ($ this -> customs ['user ' ])) {
144
144
$ this ->customs ['user ' ] = $ this ->data ->callback_query ->from ??
145
- $ this ->customs [ ' user ' ] ->from ??
146
- $ this ->customs [ ' user ' ] ->sender_chat ??
145
+ $ this ->getChat () ->from ??
146
+ $ this ->getChat () ->sender_chat ??
147
147
$ this ->data ->inline_query ->from ??
148
148
$ this ->data ->chosen_inline_result ->from ??
149
149
$ this ->data ->callback_query ->from ??
0 commit comments