forked from GNUsocial/gnu-social
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}
This commit is contained in:
parent
2c8536dbf0
commit
3ae81f095c
@ -138,6 +138,7 @@ class TwitterImport
|
|||||||
$notice->profile_id = $profile->id;
|
$notice->profile_id = $profile->id;
|
||||||
$notice->uri = $statusUri;
|
$notice->uri = $statusUri;
|
||||||
$notice->url = $statusUri;
|
$notice->url = $statusUri;
|
||||||
|
$notice->verb = ActivityVerb::POST;
|
||||||
$notice->created = strftime(
|
$notice->created = strftime(
|
||||||
'%Y-%m-%d %H:%M:%S',
|
'%Y-%m-%d %H:%M:%S',
|
||||||
strtotime($status->created_at)
|
strtotime($status->created_at)
|
||||||
|
Loading…
Reference in New Issue
Block a user