diff --git a/README.md b/README.md index 99e71fec..22bb335d 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,8 @@ You can find examples for nearly every MadelineProto function in * [Download to file](https://docs.madelineproto.xyz/docs/FILES.html#download-to-file) * [Download to stream](https://docs.madelineproto.xyz/docs/FILES.html#download-to-stream) * [Download to callback](https://docs.madelineproto.xyz/docs/FILES.html#download-to-callback) - * [Download to browser (streaming)](https://docs.madelineproto.xyz/docs/FILES.html#download-to-browser-with-streams) + * [Download to http-server](https://docs.madelineproto.xyz/docs/FILES.html#download-to-http-server) + * [Download to browser](https://docs.madelineproto.xyz/docs/FILES.html#download-to-browser) * [Getting progress](https://docs.madelineproto.xyz/docs/FILES.html#getting-progress) * [Getting info about chats](https://docs.madelineproto.xyz/docs/CHAT_INFO.html) * [Full chat info with full list of participants](https://docs.madelineproto.xyz/docs/CHAT_INFO.html#getPwrChat-now-fully-async) diff --git a/docs b/docs index de466b0b..1523eda4 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit de466b0b0962007f79b4405bdd21b3a0dd08f9ee +Subproject commit 1523eda477bfd325bd78590d17e36359365f2530 diff --git a/src/danog/MadelineProto/AbstractAPIFactory.php b/src/danog/MadelineProto/AbstractAPIFactory.php index 6d7568ed..e9cacd41 100644 --- a/src/danog/MadelineProto/AbstractAPIFactory.php +++ b/src/danog/MadelineProto/AbstractAPIFactory.php @@ -70,7 +70,8 @@ abstract class AbstractAPIFactory extends AsyncConstruct */ protected function exportNamespace(string $namespace = ''): self { - $class = \array_reverse(\array_values(\class_parents(static::class)))[3]; + $class = \array_reverse(\array_values(\class_parents(static::class)))[$namespace ? 2 : 3]; + $instance = new $class; $instance->namespace = $namespace ? $namespace.'.' : ''; self::link($instance, $this);