Reputation: 97
I'd tried forwarding bot received messages for myself. my code works for some channels but doesn't work for other channels.
Are the channels different in telegram ?!!
my code:
$frmmsgid= $update["message"]["forward_from_message_id"];
$frmcht= $update["message"]["forward_from_chat"]["id"];
forward($myId,$frmcht,urlencode($frmmsgid));
function forward($to, $from, $mes)
{
$url = $GLOBALS['webSite'] . "/forwardMessage?chat_id=" . $to . "&from_chat_id=" . $from . "&message_id=" . $mes;
$result = file_get_contents($url);
}
Upvotes: 1
Views: 5268
Reputation: 3067
As 91DarioDev mentioned, bots cannot forward message from channels where they aren't admins (bots can't be members of channels, only admins).
Upvotes: 4