]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Fix potential bugs without expected behavior change
[friendica.git] / src / Model / Item.php
index cffa25397c850df81bd3a1e57d091cdec3edefe8..bc3d58c4a5f84b4ebe685c5963dfe2356f6725f8 100644 (file)
@@ -1252,6 +1252,8 @@ class Item extends BaseObject
        {
                $orig_item = $item;
 
+               $priority = PRIORITY_HIGH;
+
                // If it is a posting where users should get notifications, then define it as wall posting
                if ($notify) {
                        $item['wall'] = 1;
@@ -1261,8 +1263,6 @@ class Item extends BaseObject
 
                        if (is_int($notify)) {
                                $priority = $notify;
-                       } else {
-                               $priority = PRIORITY_HIGH;
                        }
                } else {
                        $item['network'] = trim(defaults($item, 'network', Protocol::PHANTOM));
@@ -1850,7 +1850,7 @@ class Item extends BaseObject
                                $cmd = 'wall-new';
                        }
 
-                       Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'Notifier', $cmd, $current_post);
+                       Worker::add(['priority' => $priority, 'dont_fork' => true], 'Notifier', $cmd, $current_post);
                }
 
                return $current_post;