I want to send my post to Telegram when it is created. I have read discussion here and inspected these code from n7studio, but my function send_posts_to_Telegram
doesn't fire when I publish post
. Isn't rest_after_insert_post
fire when post are being published from REST API and Gutenberg?
add_action('rest_after_insert_post', 'send_posts_to_Telegram', 10, 3);
function send_posts_to_Telegram($post, $request, $creating = true){
//Send post to Telegram
}