1

This is example of my code

if ($update->isType('chat_join_request')) {    
           

$messageData = ['chat_id' =>$update->chatJoinRequest->from->id,
                'text' => $post->post,
            ];
$bot->sendMessage($messageData)
$bot->post('approveChatJoinRequest', [
                'chat_id' => $update->chatJoinRequest->chat->id,
                'user_id' => $update->chatJoinRequest->from->id
            ]);

Documentation said that telegram bot can send message after chat_join_request. documentation. My bot accepts subscribers into the group but not send message(403 Forbidden: bot can't initiate conversation with a user). Why it is happen and what I should do?

I tried to send with 'chat_id' =>$update->user_chat_id except of $update->chatJoinRequest->from->id. I tried to find answer in documentation. I asked this question in https://t.me/BotTalk and nobody suggested anything.

0 Answers0