tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

I can't send a video to a secret chat. #2997

Closed fat-complex closed 3 months ago

fat-complex commented 3 months ago

I'm trying to send a video to a secret chat. I use a bunch of SendMessage and inputMessageVideo requests. In regular chats with such a bunch of requests, the video is sent and you can watch it, and in secret chats you can see that you have received a video message but you cannot watch it. It's empty. Do I need to do something extra so that I can send videos to a secret chat?

levlam commented 3 months ago

What is the app on the other side?

fat-complex commented 3 months ago

@levlam the client on iOS

fat-complex commented 3 months ago

@levlam I use this code:

    auto mc = make_tdobj<inputMessageVideo>();
    mc->thumbnail_ = nullptr;
    mc->video_ = make_tdobj<inputFileLocal>(path.toStdString());

This code for sending videos works in other chats except for the secret one.

fat-complex commented 3 months ago

I figured it out. I need to manually generate a thumbnail for the video and set the video dimensions. In my case, it worked.