contentlimit: max length of the plain-text content of a notice.
Default is null, meaning to use the site-wide text limit.
0 means no limit.
+defaultscope: default scope for notices. Defaults to 0; set to
+ 1 to keep notices private to this site by default.
message
-------
* notice in place of extracting links from content
* boolean 'distribute' whether to distribute the notice, default true
* string 'object_type' URL of the associated object type (default ActivityObject::NOTE)
+ * int 'scope' Scope bitmask; default to SITE_SCOPE on private sites, 0 otherwise
*
* @fixme tag override
*
'url' => null,
'reply_to' => null,
'repeat_of' => null,
+ 'scope' => null,
'distribute' => true);
if (!empty($options)) {
$notice->object_type = $object_type;
}
+ if (is_null($scope)) { // 0 is a valid value
+ $notice->scope = common_config('notice', 'defaultscope');
+ } else {
+ $notice->scope = $scope;
+ }
+
if (Event::handle('StartNoticeSave', array(&$notice))) {
// XXX: some of these functions write to the DB
array('enabled' => true,
'css' => ''),
'notice' =>
- array('contentlimit' => null),
+ array('contentlimit' => null,
+ 'defaultscope' => 0), // set to 0 for default open
'message' =>
array('contentlimit' => null),
'location' =>