]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't store object type for verbs (as they don't have it)
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 2 Jan 2016 15:05:20 +0000 (16:05 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 2 Jan 2016 15:05:20 +0000 (16:05 +0100)
classes/Notice.php
plugins/Activity/ActivityPlugin.php
plugins/Favorite/FavoritePlugin.php
plugins/Share/SharePlugin.php

index ab9d928e6440aba6a17c98ec621f126fdd5409d1..1afc6d09772d583df574ec4395f0053e97bc16d5 100644 (file)
@@ -90,7 +90,7 @@ class Notice extends Managed_DataObject
                 'source' => array('type' => 'varchar', 'length' => 32, 'description' => 'source of comment, like "web", "im", or "clientname"'),
                 'conversation' => array('type' => 'int', 'description' => 'id of root notice in this conversation'),
                 'repeat_of' => array('type' => 'int', 'description' => 'notice this is a repeat of'),
-                'object_type' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams object type', 'default' => 'http://activitystrea.ms/schema/1.0/note'),
+                'object_type' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams object type', 'default' => null),
                 'verb' => array('type' => 'varchar', 'length' => 191, 'description' => 'URI representing activity streams verb', 'default' => 'http://activitystrea.ms/schema/1.0/post'),
                 'scope' => array('type' => 'int',
                                  'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers; null = default'),
index d8f3c6c50228b2480befa3cc7efeb59ca80dd2a8..6805b4fe07d30b546578b2db44367dfc59803c4d 100644 (file)
@@ -183,7 +183,7 @@ class ActivityPlugin extends Plugin
                                         'uri' => $uri,
                                         'verb' => ActivityVerb::UNFAVORITE,
                                         'object_type' => (($notice->verb == ActivityVerb::POST) ?
-                                                         $notice->object_type : ActivityObject::ACTIVITY)));
+                                                         $notice->object_type : null)));
 
         return true;
     }
index b10a5f06ac9525cef1798250fce92fa6adcc8178..36fa3dc44add252ea68f7ef439dfc6ad8b82ad9c 100644 (file)
@@ -194,7 +194,6 @@ class FavoritePlugin extends ActivityVerbHandlerPlugin
         $actobj = $act->objects[0];
 
         $object = Fave::saveActivityObject($actobj, $stored);
-        $stored->object_type = $object->getObjectType();
 
         return $object;
     }
index 84174a0440895d597e657d99f014b04bf66e573b..d1aece5c3df49d5f694bad85a85212e63fc2362d 100644 (file)
@@ -128,7 +128,6 @@ class SharePlugin extends ActivityVerbHandlerPlugin
         // Notice::saveActivity it will update the Notice object.
         $stored->repeat_of = $sharedNotice->getID();
         $stored->conversation = $sharedNotice->conversation;
-        $stored->object_type = ActivityUtils::resolveUri(ActivityObject::ACTIVITY, true);
 
         // We don't have to save a repeat in a separate table, we can
         // find repeats by just looking at the notice.repeat_of field.