$user = common_current_user();
assert($user); # XXX: maybe an error instead...
- $notice = DB_DataObject::factory('notice');
+ $notice = new Notice();
assert($notice);
$notice->profile_id = $user->id; # user id *is* profile id
+ $notice->is_local = 1;
$notice->created = DB_DataObject_Cast::dateTime();
# Default theme uses 'content' for something else
$notice->content = $this->trimmed('status_textarea');
$notice = Notice::staticGet('uri', $notice_uri);
if (!$notice) {
$notice = new Notice();
+ $notice->is_local = 0;
$notice->profile_id = $remote_profile->id;
$notice->uri = $notice_uri;
$notice->content = $content;
function add_notice($user, $msg) {
$notice = new Notice();
+ $notice->is_local = 1;
$notice->profile_id = $user->id;
$notice->content = trim(substr($msg, 0, 140));
$notice->rendered = common_render_content($notice->content, $notice);
function add_notice(&$user, &$pl) {
$notice = new Notice();
+ $notice->is_local = 1;
$notice->profile_id = $user->id;
$notice->content = trim(substr($pl['body'], 0, 140));
$notice->rendered = common_render_content($notice->content, $notice);