From 7a1d3302d0ab87b3757dfaf56f5700960b1cdcfa Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 2 Oct 2021 11:52:24 -0400 Subject: [PATCH] [twitter] Add support for the new support_follow hook --- twitter/twitter.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/twitter/twitter.php b/twitter/twitter.php index 02470f98..f753ee97 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -104,6 +104,7 @@ function twitter_install() Hook::register('notifier_normal' , __FILE__, 'twitter_post_hook'); Hook::register('jot_networks' , __FILE__, 'twitter_jot_nets'); Hook::register('cron' , __FILE__, 'twitter_cron'); + Hook::register('support_follow' , __FILE__, 'twitter_support_follow'); Hook::register('follow' , __FILE__, 'twitter_follow'); Hook::register('unfollow' , __FILE__, 'twitter_unfollow'); Hook::register('expire' , __FILE__, 'twitter_expire'); @@ -135,6 +136,13 @@ function twitter_check_item_notification(App $a, array &$notification_data) } } +function twitter_support_follow(App $a, array &$data) +{ + if ($data['protocol'] == Protocol::TWITTER) { + $data['result'] = true; + } +} + function twitter_follow(App $a, array &$contact) { Logger::info('Check if contact is twitter contact', ['url' => $contact["url"]]); -- 2.39.5