lgg / vk-to-telegram-bot

Bot for auto-reposting posts from VK to Telegram channel
129 stars 21 forks source link

Video attach support in manager #54

Open lev-savranskiy opened 5 years ago

lev-savranskiy commented 5 years ago

please add simple video attach support in class Manager

      _if ($attach["type"] == "photo") {
                            $telegram->sendPhoto(VkApi::findMaxSizeLink($attach["photo"]));
                        } elseif ($attach["type"] == "link" && isset($attach["link"]["photo"])) {
                            $telegram->sendPhoto(VkApi::findMaxSizeLink($attach["link"]["photo"]));
                        } elseif ($attach["type"] == "doc" && isset($attach["doc"]["preview"]["video"])) {
                           $telegram->sendGIF($attach["doc"]["preview"]["video"]['src']);
                        } elseif ($attach["type"] == "video" && isset($attach["video"]["photo_320"])) {
                           $telegram->sendPhoto(VkApi::findMaxSizeLink($attach["video"]));
                        }_