]> git.mxchange.org Git - friendica.git/commitdiff
Lower priority for "remote self"
authorMichael <heluecht@pirati.ca>
Tue, 15 May 2018 19:29:14 +0000 (19:29 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 15 May 2018 19:29:14 +0000 (19:29 +0000)
src/Model/Item.php
src/Protocol/Feed.php

index 210a6010976c5b40fd078705142152876f166485..a5ab507c254d433d8fdc566f7afbc1bf93e1535e 100644 (file)
@@ -344,6 +344,12 @@ class Item extends BaseObject
                        $item['origin'] = 1;
                        $item['network'] = NETWORK_DFRN;
                        $item['protocol'] = PROTOCOL_DFRN;
+
+                       if (is_int($notify)) {
+                               $priority = $notify;
+                       } else {
+                               $priority = PRIORITY_HIGH;
+                       }
                } else {
                        $item['network'] = trim(defaults($item, 'network', NETWORK_PHANTOM));
                }
@@ -872,7 +878,7 @@ class Item extends BaseObject
                check_user_notification($current_post);
 
                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']) {
                        Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "Notifier", "comment-import", $current_post);
                }
index 191070a2c5b52ac854a61a3790624c4f430193d0..c04e40b5e520d8871631e826c3310cc211b15ffe 100644 (file)
@@ -430,6 +430,9 @@ class Feed {
                                        $item['guid'] = Item::guidFromUri($orig_plink, $a->get_hostname());
                                        unset($item['uri']);
                                        unset($item['parent-uri']);
+
+                                       // Set the delivery priority for "remote self" to "medium"
+                                       $notify = PRIORITY_MEDIUM;
                                }
 
                                $id = Item::insert($item, false, $notify);