I'm using the Madeline Project to automate some activities in the telegram communities. Bots are not suitable to do these tasks due to the restrictions they have. So I'm trying to use normal user accounts.
Everything works smoothly with some types of channels but with the chats I'm encountering some problems.
There are two ways to join a chat/channel. With the TelegramID and with the HASH.
With the HASH is pretty simple, I use this function and works like a charm:
$MadelineProto->messages->importChatInvite(['hash' => <HASH_CODE>, ]);
But with the Telegram's IDs the things gets complicate. Because a Telegram ID can identify a Chat OR a Channel Group
Normally I use this function:
$MadelineProto->channels->joinChannel(['channel' => <Telegram_ID>, ]);
But it fails when the target of the ID is a chat and not a channel.
There isn't any function to join a Chat in MadelineProto
.
How can I do?
Sorry but the project is very poorly documented. Thank you all.