From ef638b0f22e19e97cfac9fa00e19e75d51f1e05e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 16 Mar 2011 22:30:31 -0400 Subject: [PATCH] Add scope bitmap for notices --- classes/Notice.php | 1 + classes/statusnet.ini | 1 + db/core.php | 3 +++ 3 files changed, 5 insertions(+) diff --git a/classes/Notice.php b/classes/Notice.php index 664e5dab9f..36686f6f2d 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -73,6 +73,7 @@ class Notice extends Memcached_DataObject public $location_ns; // int(4) public $repeat_of; // int(4) public $object_type; // varchar(255) + public $scope; // int(4) /* Static get */ function staticGet($k,$v=NULL) diff --git a/classes/statusnet.ini b/classes/statusnet.ini index 338e5c5aea..b598f9fc68 100644 --- a/classes/statusnet.ini +++ b/classes/statusnet.ini @@ -337,6 +337,7 @@ location_id = 1 location_ns = 1 repeat_of = 1 object_type = 2 +scope = 1 [notice__keys] id = N diff --git a/db/core.php b/db/core.php index 16a59462d4..4881cc0fff 100644 --- a/db/core.php +++ b/db/core.php @@ -202,6 +202,9 @@ $schema['notice'] = array( 'location_ns' => array('type' => 'int', 'description' => 'namespace for location'), 'repeat_of' => array('type' => 'int', 'description' => 'notice this is a repeat of'), 'object_type' => array('type' => 'varchar', 'length' => 255, 'description' => 'URI representing activity streams object type', 'default' => 'http://activitystrea.ms/schema/1.0/note'), + 'scope' => array('type' => 'int', + 'default' => '1', + 'description' => 'bit map for distribution scope; 0 = everywhere; 1 = this server only; 2 = addressees; 4 = followers'), ), 'primary key' => array('id'), 'unique keys' => array(