Title: Only send notification when post published.
Last modified: August 31, 2016

---

# Only send notification when post published.

 *  [damonsomu](https://wordpress.org/support/users/damonsomu/)
 * (@damonsomu)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/)
 * Hi,
    Its a really awesome plugin but some small modifications can make it more
   cooler. I am talking about notification when a post published(new post), not 
   while a post gets updated, page updated or something else. Its more likely a 
   functionality like the plugin “one signal push notification”. This plugin have
   a functionality so that notification is send when a new post is published automatically,
   not when a post gets updated or something else. If the user wants while updating
   a post he/she can choose to send notification by clicking on “send notification”
   option inside the post editor area. If there is any quick solution to this I 
   would love to know because I dont want all my posts notify the user, else it 
   would be great if a new update with this facility will be available.
 * Thanks in advance!!
 * [https://wordpress.org/plugins/telegram-for-wp/](https://wordpress.org/plugins/telegram-for-wp/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Jeff McNeill](https://wordpress.org/support/users/jeffmcneill/)
 * (@jeffmcneill)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/#post-7457181)
 * I agree with this +1,000. At the very least allow the checkbox to be toggled 
   to on when unpublished and off when published. That way if someone wants to push
   an updated post they can check the box manually.
 * Next best is unchecked by default. That can be set in the settings area under
   Post to Channel > Always send to Telegram > Uncheck
 * Feature Request: If Published, uncheck the checkbox for publishing
 * I realize that the setting just sets the default in the X currently and there
   is nothing checked on the status of the page, but it would be easy: If status
   = published, uncheck box.
 * See: [https://codex.wordpress.org/Function_Reference/get_post_status](https://codex.wordpress.org/Function_Reference/get_post_status)
 * [@damonsomu](https://wordpress.org/support/users/damonsomu/), in the WordPress
   editor (post or page) click the Options tab near the top and check the box: “
   Telegram Channel Options”, if you do not see that part of the editor with the
   checkbox.
 *  [xaviermi](https://wordpress.org/support/users/xaviermi/)
 * (@xaviermi)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/#post-7457523)
 * I agree with this. Please, if Published, uncheck the checkbox for publishing.
   
   I have more collaborators on the same blog and when someone update an article,
   this is republished. It’s trying. 🙁
 *  [md_hedji](https://wordpress.org/support/users/md_hedji/)
 * (@md_hedji)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/#post-8547846)
 * [@damonsomu](https://wordpress.org/support/users/damonsomu/)
    workaround for 
   this open /wp-content/plugins/telegram-for-wp/functions.php
 * find function twp_post_published
    line 423
 *     ```
       twp_post_published ( $ID, $post, $pattern, $thumb_method, $twp_img_id, $twp_file_id ) {
       	global $wpdb;
       	global $table_name;
       	global $tdata;
       ```
   
 * and add new line after global $tdata;
 *     ```
        if ($post->post_status == "publish" && $post->post_modified_gmt == $post->post_date_gmt)
             {
       ```
   
 * next go to line 616
    find `//unset($_POST['twp_send_to_channel']);`
 * add after this line
 * `}`
 * All done. Now plugin will send notification **only** when post published
    -  This reply was modified 9 years, 4 months ago by [md_hedji](https://wordpress.org/support/users/md_hedji/).
    -  This reply was modified 9 years, 4 months ago by [md_hedji](https://wordpress.org/support/users/md_hedji/).
    -  This reply was modified 9 years, 4 months ago by [md_hedji](https://wordpress.org/support/users/md_hedji/).
 *  [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/#post-8825613)
 * You have that full control in this plugin
    [https://wordpress.org/plugins/wptelegram/](https://wordpress.org/plugins/wptelegram/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Only send notification when post published.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/telegram-for-wp_00a2ed.svg)
 * [Telegram for WP](https://wordpress.org/plugins/telegram-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/telegram-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/telegram-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/telegram-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/telegram-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/telegram-for-wp/reviews/)

## Tags

 * [not updated](https://wordpress.org/support/topic-tag/not-updated/)

 * 4 replies
 * 5 participants
 * Last reply from: [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/only-send-notification-when-post-published-1/#post-8825613)
 * Status: not resolved