Fix: /events

This commit is contained in:
Alexander Pankratov 2023-07-27 22:29:09 +02:00
parent 8ac36c691f
commit 83b1f8a9a4
2 changed files with 12 additions and 11 deletions

22
composer.lock generated
View File

@ -316,16 +316,16 @@
}, },
{ {
"name": "amphp/file", "name": "amphp/file",
"version": "v3.0.0", "version": "v3.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/amphp/file.git", "url": "https://github.com/amphp/file.git",
"reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b" "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/amphp/file/zipball/1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", "url": "https://api.github.com/repos/amphp/file/zipball/efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd",
"reference": "1c9f0ebdb20ae05f1540fca3e7a517f7f166652b", "reference": "efeb737b1f19a7fcfe8a763c5ef2ad80dbac93dd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -389,7 +389,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/amphp/file/issues", "issues": "https://github.com/amphp/file/issues",
"source": "https://github.com/amphp/file/tree/v3.0.0" "source": "https://github.com/amphp/file/tree/v3.0.1"
}, },
"funding": [ "funding": [
{ {
@ -397,7 +397,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-03-02T22:29:08+00:00" "time": "2023-07-23T18:54:06+00:00"
}, },
{ {
"name": "amphp/hpack", "name": "amphp/hpack",
@ -2506,12 +2506,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/danog/MadelineProto.git", "url": "https://github.com/danog/MadelineProto.git",
"reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da" "reference": "266370354708e850254e7db76822801026aeee6e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/danog/MadelineProto/zipball/6e3312917e5374f5747c6dd2db6da561f8ec70da", "url": "https://api.github.com/repos/danog/MadelineProto/zipball/266370354708e850254e7db76822801026aeee6e",
"reference": "6e3312917e5374f5747c6dd2db6da561f8ec70da", "reference": "266370354708e850254e7db76822801026aeee6e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2619,7 +2619,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/danog/MadelineProto/issues", "issues": "https://github.com/danog/MadelineProto/issues",
"source": "https://github.com/danog/MadelineProto/tree/v8" "source": "https://github.com/danog/MadelineProto/tree/8.0.0-beta127"
}, },
"funding": [ "funding": [
{ {
@ -2627,7 +2627,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-07-23T14:33:02+00:00" "time": "2023-07-27T11:21:21+00:00"
}, },
{ {
"name": "danog/primemodule", "name": "danog/primemodule",

View File

@ -57,6 +57,7 @@ class EventObserver
$property = new ReflectionProperty($instance, "wrapper"); $property = new ReflectionProperty($instance, "wrapper");
/** @var APIWrapper $wrapper */ /** @var APIWrapper $wrapper */
$wrapper = $property->getValue($instance); $wrapper = $property->getValue($instance);
EventHandler::cachePlugins(EventHandler::class);
$wrapper->getAPI()->setEventHandler(EventHandler::class); $wrapper->getAPI()->setEventHandler(EventHandler::class);
} catch (Throwable $e) { } catch (Throwable $e) {
static::removeSessionClient($session); static::removeSessionClient($session);