]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'twitter-verb' into 'nightly'
authormmn <mmn@hethane.se>
Thu, 5 Nov 2015 15:01:07 +0000 (15:01 +0000)
committermmn <mmn@hethane.se>
Thu, 5 Nov 2015 15:01:07 +0000 (15:01 +0000)
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}

See merge request !50

classes/User_group.php
plugins/Activity/locale/sv/LC_MESSAGES/Activity.po
plugins/ActivityVerbPost/ActivityVerbPostPlugin.php

index 01437ace39a6b2aa88506990fc5171c5107d9ab7..344394a682052ef9d8d3203f1e41491002881837 100644 (file)
@@ -33,6 +33,12 @@ class User_group extends Managed_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
+    public function getObjectType()
+    {
+        return ActivityObject::GROUP;
+    }
+
+
     public static function schemaDef()
     {
         return array(
index b32f4dbe9d2886e0be27c7154b8312958d5488f1..c37cef4a76868b8e831512ded601b4a3ba9fa703 100644 (file)
@@ -24,7 +24,7 @@ msgstr ""
 #: ActivityPlugin.php:75
 #, php-format
 msgid "<a href=\"%1$s\">%2$s</a> started following <a href=\"%3$s\">%4$s</a>."
-msgstr "<a href=\"%1$s\">%2$s</a> började följa <a href=\"%3$s\">%4$s</a."
+msgstr "<a href=\"%1$s\">%2$s</a> började följa <a href=\"%3$s\">%4$s</a>."
 
 #. TRANS: Text for "started following" item in activity plugin.
 #. TRANS: %1$s is a profile name, %2$s is a profile URL,
index 6dd182bc924740b8d266d4b8d30a3ec8b27f49d0..5dd0ee12d7bafb426cb7b9a8a8b277020e2d3c8b 100644 (file)
@@ -54,6 +54,9 @@ class ActivityVerbPostPlugin extends ActivityVerbHandlerPlugin
         assert($this->isMyActivity($act));
 
         $stored->object_type = ActivityUtils::resolveUri($act->objects[0]->type);
+        if (common_valid_http_url($act->objects[0]->link)) {
+            $stored->url = $act->objects[0]->link;
+        }
 
         // We don't have to do just about anything for a new, remote notice since the fields
         // are handled in the main Notice::saveActivity function. Such as content, attachments,