mirror of
https://github.com/friendica/friendica
synced 2025-09-04 20:09:55 +02:00
Fix delivery counter for poking / unify delivery commands
This commit is contained in:
parent
f5606fb211
commit
41dc243186
16 changed files with 38 additions and 73 deletions
|
@ -21,6 +21,7 @@ use Friendica\Module\Login;
|
|||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
||||
function events_init(App $a)
|
||||
{
|
||||
|
@ -195,7 +196,7 @@ function events_post(App $a)
|
|||
$item_id = Event::store($datarray);
|
||||
|
||||
if (!$cid) {
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", "event", $item_id);
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $item_id);
|
||||
}
|
||||
|
||||
$a->internalRedirect('events');
|
||||
|
|
|
@ -10,6 +10,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
||||
function fsuggest_post(App $a)
|
||||
{
|
||||
|
@ -51,7 +52,7 @@ function fsuggest_post(App $a)
|
|||
'photo' => $contact['avatar'], 'note' => $note, 'created' => DateTimeFormat::utcNow()];
|
||||
DBA::insert('fsuggest', $fields);
|
||||
|
||||
Worker::add(PRIORITY_HIGH, 'Notifier', 'suggest', DBA::lastInsertId());
|
||||
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, DBA::lastInsertId());
|
||||
|
||||
info(L10n::t('Friend suggestion sent.') . EOL);
|
||||
}
|
||||
|
|
|
@ -604,8 +604,6 @@ function item_post(App $a) {
|
|||
$origin = $_REQUEST['origin'];
|
||||
}
|
||||
|
||||
$notify_type = ($toplevel_item_id ? Delivery::COMMENT : Delivery::POST);
|
||||
|
||||
$uri = ($message_id ? $message_id : Item::newURI($api_source ? $profile_uid : $uid, $guid));
|
||||
|
||||
// Fallback so that we alway have a parent uri
|
||||
|
@ -870,7 +868,7 @@ function item_post(App $a) {
|
|||
// When we are doing some forum posting via ! we have to start the notifier manually.
|
||||
// These kind of posts don't initiate the notifier call in the item class.
|
||||
if ($only_to_forum) {
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id);
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post_id);
|
||||
}
|
||||
|
||||
Logger::log('post_complete');
|
||||
|
|
|
@ -27,6 +27,7 @@ use Friendica\Protocol\Email;
|
|||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
||||
function get_theme_config_file($theme)
|
||||
{
|
||||
|
@ -389,7 +390,7 @@ function settings_post(App $a)
|
|||
BaseModule::checkFormSecurityTokenRedirectOnError('/settings', 'settings');
|
||||
|
||||
if (!empty($_POST['resend_relocate'])) {
|
||||
Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', local_user());
|
||||
Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, local_user());
|
||||
info(L10n::t("Relocate message has been send to your contacts"));
|
||||
$a->internalRedirect('settings');
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\XML;
|
||||
use Friendica\Worker\Delivery;
|
||||
|
||||
function tagger_content(App $a) {
|
||||
|
||||
|
@ -194,7 +195,7 @@ EOT;
|
|||
|
||||
Hook::callAll('post_local_end', $arr);
|
||||
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post_id);
|
||||
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue