Esempio n. 1
0
 /**
  * do telegram settings
  * @param  [type] $_options [description]
  * @return [type]           [description]
  */
 public function doTelegram($_options)
 {
     // if key is fake do not run telegram hook
     if (!isset($_options['key']) || strlen($_options['key']) < 20) {
         return null;
     }
     if (isset($_options['debug']) && $_options['debug']) {
         return false;
     }
     if (isset($_options['hook'])) {
         $result = \lib\telegram\tg::setWebhook();
     } else {
         $result = \lib\telegram\tg::unsetWebhook();
     }
     debug::true($result);
 }