Plugin Directory

Changeset 1434140


Ignore:
Timestamp:
06/09/2016 08:15:57 PM (10 years ago)
Author:
websima
Message:

new version - bug fix

Location:
channeller-telegram-channel-administrator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • channeller-telegram-channel-administrator/trunk/channeller.php

    r1373950 r1434140  
    22/**
    33 * @package Websima Telegram Channel
    4  * @version 1.4.0
     4 * @version 1.4.1
    55 */
    66/*
     
    99Description: Send Text, URL, Photo, Video and Audio from Wordpress to Telegram Channel using Telegram bot API.
    1010Author: Websima Creative Agency
    11 Version: 1.4.0
     11Version: 1.4.1
    1212Author URI: http://websima.com
    1313*/
  • channeller-telegram-channel-administrator/trunk/includes/ch-send-functions.php

    r1373950 r1434140  
    170170    $message = truncate_channeller ($message , 4096);
    171171    if ($token) {
    172     $url = 'https://api.telegram.org/bot'.$token.'/sendMessage';
    173     $data = array('chat_id' => $user_id,'text' => $message,'parse_mode' => 'HTML');
    174         $options = array(
    175         'http' => array(
    176         'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
    177         'method'  => 'GET',
    178         'content' => http_build_query($data),
    179         )
    180     );
    181     $context  = stream_context_create($options);
    182     $update = file_get_contents($url, false, $context);
     172        $message = urlencode($message);
     173    $url = 'https://api.telegram.org/bot'.$token.'/sendMessage?chat_id='.$user_id.'&text='.$message.'&parse_mode=HTML';
     174    $update = file_get_contents($url, false);
    183175    $result = json_decode($update);
    184176    if ($result->ok == 1) {
     
    194186    $logview = $options['tchannel_log'];
    195187    if ($logview == 'yes'){
    196        
    197188    channeller_log(__( 'Send Text', 'tchannel' ), $resulter ,$user_id,$logger);
    198189    }
  • channeller-telegram-channel-administrator/trunk/readme.txt

    r1373950 r1434140  
    44Tags: Telegram, Telegram Bot, Telegram Channel, Telegram API, translate ready
    55Requires at least: 3.0.1
    6 Tested up to: 4.4.2
    7 Stable tag: 1.4.0
     6Tested up to: 4.5.2
     7Stable tag: 1.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7979
    8080== Changelog ==
     81= 1.4.1 =
     82Fixed First Text Message Bug shown for some Users:
     83
    8184= 1.4.0 =
    8285Fixed Bugs
Note: See TracChangeset for help on using the changeset viewer.