From 3ae81f095c0a91beb1f9912bc91b2bc0f4aad69f Mon Sep 17 00:00:00 2001 From: Chimo Date: Tue, 27 Oct 2015 10:12:33 -0400 Subject: [PATCH] TwitterBridge: Add $notice->verb on import Since /plugins/ActivityModeration::onStartNotieSave expects it to be there when calling ActivityUtils::compareVerbs. Otherwise, the following exception is unhandled: 2015-10-26 15:33:03 LOG_ERR: [sn.chromic.org:queuedaemon.php:25931] Unhandled exception: No URI to resolve in ActivityUtils::resolveUri #0 /lib/activityutils.php(353): ActivityUtils::resolveUri(NULL) #1 /lib/activityutils.php(364): ActivityUtils::compareTypes(NULL, Array) #2 /plugins/ActivityModeration/ActivityModerationPlugin.php(113): ActivityUtils::compareVerbs(NULL, Array) #3 [internal function]: ActivityModerationPlugin->onStartNoticeSave(Object(Notice)) #4 /lib/event.php(105): call_user_func_array(Array, Array) #5 /plugins/TwitterBridge/lib/twitterimport.php(173): Event::handle('StartNoticeSave', Array) #6 /plugins/TwitterBridge/lib/twitterimport.php(72): TwitterImport->saveStatus(Object(stdClass)) #7 /plugins/TwitterBridge/lib/tweetinqueuehandler.php(52): TwitterImport->importStatus(Object(stdClass)) #8 /lib/dbqueuemanager.php(94): TweetInQueueHandler->handle(Array) #9 /lib/iomaster.php(287): DBQueueManager->poll() #10 /lib/iomaster.php(161): IoMaster->poll() #11 /scripts/queuedaemon.php(111): IoMaster->service() #12 /lib/spawningdaemon.php(189): QueueDaemon->runThread() #13 /lib/spawningdaemon.php(118): SpawningDaemon->initAndRunChild(2) #14 /lib/daemon.php(168): SpawningDaemon->run() #15 /scripts/queuedaemon.php(181): Daemon->runOnce() #16 {main} --- plugins/TwitterBridge/lib/twitterimport.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/TwitterBridge/lib/twitterimport.php b/plugins/TwitterBridge/lib/twitterimport.php index d929fecf83..9abc022fd8 100644 --- a/plugins/TwitterBridge/lib/twitterimport.php +++ b/plugins/TwitterBridge/lib/twitterimport.php @@ -138,6 +138,7 @@ class TwitterImport $notice->profile_id = $profile->id; $notice->uri = $statusUri; $notice->url = $statusUri; + $notice->verb = ActivityVerb::POST; $notice->created = strftime( '%Y-%m-%d %H:%M:%S', strtotime($status->created_at) -- 2.39.5