@@ -160,31 +160,31 @@ private function iterateOverObjectsAndEmitEvents()
160160 $ this ->bionic ->emit ('message ' , [$ this , $ contacts , $ message ]);
161161
162162 if ($ text = $ message ->getText ())
163- $ this ->bionic ->emit ('message.text ' , [$ this , $ contacts , $ text ]);
163+ $ this ->bionic ->emit ('message.text ' , [$ this , $ contacts , $ message , $ text ]);
164164
165165 if ($ location = $ message ->getLocation ())
166- $ this ->bionic ->emit ('message.location ' , [$ this , $ contacts , $ location ]);
166+ $ this ->bionic ->emit ('message.location ' , [$ this , $ contacts , $ message , $ location ]);
167167
168168 if ($ sent_contacts = $ message ->getContacts ())
169- $ this ->bionic ->emit ('message.contacts ' , [$ this , $ contacts , $ sent_contacts ]);
169+ $ this ->bionic ->emit ('message.contacts ' , [$ this , $ contacts , $ message , $ sent_contacts ]);
170170
171171 if ($ errors = $ message ->getErrors ())
172- $ this ->bionic ->emit ('message.errors ' , [$ this , $ contacts , $ errors ]);
172+ $ this ->bionic ->emit ('message.errors ' , [$ this , $ contacts , $ message , $ errors ]);
173173
174174 if ($ image = $ message ->getImage ())
175- $ this ->bionic ->emit ('message.image ' , [$ this , $ contacts , $ image ]);
175+ $ this ->bionic ->emit ('message.image ' , [$ this , $ contacts , $ message , $ image ]);
176176
177177 if ($ document = $ message ->getDocument ())
178- $ this ->bionic ->emit ('message.document ' , [$ this , $ contacts , $ document ]);
178+ $ this ->bionic ->emit ('message.document ' , [$ this , $ contacts , $ message , $ document ]);
179179
180180 if ($ voice = $ message ->getVoice ())
181- $ this ->bionic ->emit ('message.voice ' , [$ this , $ contacts , $ voice ]);
181+ $ this ->bionic ->emit ('message.voice ' , [$ this , $ contacts , $ message , $ voice ]);
182182
183183 if ($ sticker = $ message ->getSticker ())
184- $ this ->bionic ->emit ('message.sticker ' , [$ this , $ contacts , $ sticker ]);
184+ $ this ->bionic ->emit ('message.sticker ' , [$ this , $ contacts , $ message , $ sticker ]);
185185
186186 if ($ system = $ message ->getSystem ())
187- $ this ->bionic ->emit ('message.system ' , [$ this , $ contacts , $ system ]);
187+ $ this ->bionic ->emit ('message.system ' , [$ this , $ contacts , $ message , $ system ]);
188188 }
189189 }
190190
0 commit comments