xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
576 stars 130 forks source link

Feature Request : Move session files to a subfolder #18

Closed Exlord closed 4 years ago

Exlord commented 4 years ago

On option for creating session files in a subfolder would be nice , in case of the multi session with lots of sessions.

xtrime-ru commented 4 years ago

You can do that now.

Create folder for sessions manually, for example sessions and start server like

php server.php --session=sessions/user --session=sessions/bot

this will create (or use existing) two sessions in your sessions subfolder: user.madeline and bot.madeline.

Anyway I will add automatic folder creation today.

xtrime-ru commented 4 years ago

Automatic folder creation added: https://github.com/xtrime-ru/TelegramApiServer/commit/b5672aaf3e57c3785a604dc76d28beb0d4a02367

xtrime-ru commented 4 years ago

I forgot about routing. Working on it, to support subfolders in urls.

xtrime-ru commented 4 years ago

Full support of folders in router, and automatic move of existing sessions to sessions folder on start: https://github.com/xtrime-ru/TelegramApiServer/commit/a8319368e69ec670bb592dac53de88748282cc2a