Api icon indicating copy to clipboard operation
Api copied to clipboard

protect_content

Open galeoner opened this issue 3 years ago • 13 comments

Good afternoon! I want to use the protect_content=true parameter to send messages with text/picture How does it turn on?

galeoner avatar May 23 '23 15:05 galeoner

Hello! Currently it's not supported

BoShurik avatar May 23 '23 15:05 BoShurik

Thanks! If it's not a secret, when can we approximately expect the addition of this function?

galeoner avatar May 23 '23 16:05 galeoner

On this week I hope :)

BoShurik avatar May 23 '23 17:05 BoShurik

@galeoner can you check changes in master and then I'll tag a release?

BoShurik avatar May 24 '23 09:05 BoShurik

Thanks! I’ll check it in current week.

galeoner avatar May 24 '23 15:05 galeoner

Recheck again, after handled download from master) worked!!! Thank you!

galeoner avatar May 24 '23 16:05 galeoner

I read the description for the sendPhoto procedure. Have they forgotten about it or are they deliberately underworking it? For there are no such fields there either.

galeoner avatar May 24 '23 18:05 galeoner

What do yo mean? There is protect_content at https://core.telegram.org/bots/api#sendphoto and https://github.com/TelegramBot/Api/blob/master/src/BotApi.php#L1299

BoShurik avatar May 24 '23 18:05 BoShurik

I was looking the wrong way. Thank you so much! Last question. Tell me where you can see how to send send Media Group images from a local disk from server. Unfortunately, it is impossible to use links in my case. But I don't understand the logic a little bit how to do it within this library.

galeoner avatar May 25 '23 09:05 galeoner

Did you try method from README?

BoShurik avatar May 25 '23 09:05 BoShurik

I tried of course) Only I saw how to send web links but not a local file. This is not in your description.

galeoner avatar May 25 '23 09:05 galeoner

$document = new \CURLFile('document.txt');
$bot->sendDocument($chatId, $document);

document.txt - is a local file

BoShurik avatar May 25 '23 09:05 BoShurik

I was talking about sendMediaGroup)

galeoner avatar May 25 '23 09:05 galeoner