danog / MadelineProto

Async PHP client API for the telegram MTProto protocol
https://docs.madelineproto.xyz
GNU Affero General Public License v3.0
2.8k stars 636 forks source link

Getting timeout from 'editPhoto' fucntion #1376

Closed Kamran1991 closed 1 year ago

Kamran1991 commented 1 year ago

MadelineProto version 8 I am trying to update the channel photo but I am getting a timeout. @danog can you please have a look and let me know what is wrong?

Note: 'editTitle' function is working fine for the same channel.

Here is my code

$madelineProto = new API($telegramSession->session_file, $this->settings);
 $inputChatUploadedPhoto = ['_' => 'inputChatUploadedPhoto', 'file' => $inputFile];
  $madelineProto->channels->editPhoto(
                    channel: [
                        "_" => "updateChannel",
                        'channel_id' => $channelId
                    ],
                    photo: $inputChatUploadedPhoto);
danog commented 1 year ago

What do the logs say, and what does $channelId/$inputFile contain?

Kamran1991 commented 1 year ago

$channelId = it is channel id that we get from $channel['updates'][1][['channel_id']] $inputFile = It is the path of file that exists on the S3 bucket

@danog here is the log file and i can see it creates the logs continuously even if i am not doing anything, is it normal? MadelineProto.log

Kamran1991 commented 1 year ago

@danog can you please check above comment?

danog commented 1 year ago

$channelId must be a bot api chat id, extracted using extractMessageId($updates).