Lower priority for "remote self"
This commit is contained in:
parent
fc60e23314
commit
4a1bbd114c
|
@ -344,6 +344,12 @@ class Item extends BaseObject
|
||||||
$item['origin'] = 1;
|
$item['origin'] = 1;
|
||||||
$item['network'] = NETWORK_DFRN;
|
$item['network'] = NETWORK_DFRN;
|
||||||
$item['protocol'] = PROTOCOL_DFRN;
|
$item['protocol'] = PROTOCOL_DFRN;
|
||||||
|
|
||||||
|
if (is_int($notify)) {
|
||||||
|
$priority = $notify;
|
||||||
|
} else {
|
||||||
|
$priority = PRIORITY_HIGH;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$item['network'] = trim(defaults($item, 'network', NETWORK_PHANTOM));
|
$item['network'] = trim(defaults($item, 'network', NETWORK_PHANTOM));
|
||||||
}
|
}
|
||||||
|
@ -872,7 +878,7 @@ class Item extends BaseObject
|
||||||
check_user_notification($current_post);
|
check_user_notification($current_post);
|
||||||
|
|
||||||
if ($notify) {
|
if ($notify) {
|
||||||
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "Notifier", $notify_type, $current_post);
|
Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", $notify_type, $current_post);
|
||||||
} elseif (!empty($parent) && $parent['origin']) {
|
} elseif (!empty($parent) && $parent['origin']) {
|
||||||
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "Notifier", "comment-import", $current_post);
|
Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "Notifier", "comment-import", $current_post);
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,6 +430,9 @@ class Feed {
|
||||||
$item['guid'] = Item::guidFromUri($orig_plink, $a->get_hostname());
|
$item['guid'] = Item::guidFromUri($orig_plink, $a->get_hostname());
|
||||||
unset($item['uri']);
|
unset($item['uri']);
|
||||||
unset($item['parent-uri']);
|
unset($item['parent-uri']);
|
||||||
|
|
||||||
|
// Set the delivery priority for "remote self" to "medium"
|
||||||
|
$notify = PRIORITY_MEDIUM;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = Item::insert($item, false, $notify);
|
$id = Item::insert($item, false, $notify);
|
||||||
|
|
Loading…
Reference in a new issue