123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
- require_once __DIR__ . '/twitter.php';
- class TweetCtlQueueHandler extends QueueHandler
- {
- function transport()
- {
- return 'tweetctl';
- }
- function handle($data) : bool
- {
-
-
- $action = $data['action'];
- $userId = $data['for_user'];
- $tm = TwitterManager::get();
- if ($action == 'start') {
- $tm->startTwitterUser($userId);
- } else if ($action == 'stop') {
- $tm->stopTwitterUser($userId);
- }
- return true;
- }
- }
|