]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge pull request #8077 from annando/notifications
[friendica.git] / src / Model / Item.php
index e030141fa87fe25179ab39de2e25d60c1b5224e0..0fc1280c2b7f4577cb771b62e5f219fda2457bf2 100644 (file)
@@ -656,7 +656,7 @@ class Item
                        'iaid' => 'internal-iaid'];
 
                if ($usermode) {
-                       $fields['user-item'] = ['pinned', 'ignored' => 'internal-user-ignored'];
+                       $fields['user-item'] = ['pinned', 'notification-type', 'ignored' => 'internal-user-ignored'];
                }
 
                $fields['item-activity'] = ['activity', 'activity' => 'internal-activity'];
@@ -2026,7 +2026,7 @@ class Item
 
                self::updateContact($item);
 
-               UserItem::setNotification($current_post, $item['uid']);
+               UserItem::setNotification($current_post);
 
                check_user_notification($current_post);
 
@@ -2060,7 +2060,7 @@ class Item
                }
 
                // To avoid timing problems, we are using locks.
-               $locked = Lock::acquire('item_insert_activity');
+               $locked = DI::lock()->acquire('item_insert_activity');
                if (!$locked) {
                        Logger::log("Couldn't acquire lock for URI " . $item['uri'] . " - proceeding anyway.");
                }
@@ -2076,11 +2076,11 @@ class Item
                } else {
                        // This shouldn't happen.
                        Logger::log('Could not insert activity for URI ' . $item['uri'] . ' - should not happen');
-                       Lock::release('item_insert_activity');
+                       DI::lock()->release('item_insert_activity');
                        return false;
                }
                if ($locked) {
-                       Lock::release('item_insert_activity');
+                       DI::lock()->release('item_insert_activity');
                }
                return true;
        }
@@ -2103,7 +2103,7 @@ class Item
                }
 
                // To avoid timing problems, we are using locks.
-               $locked = Lock::acquire('item_insert_content');
+               $locked = DI::lock()->acquire('item_insert_content');
                if (!$locked) {
                        Logger::log("Couldn't acquire lock for URI " . $item['uri'] . " - proceeding anyway.");
                }
@@ -2121,7 +2121,7 @@ class Item
                        Logger::log('Could not insert content for URI ' . $item['uri'] . ' - should not happen');
                }
                if ($locked) {
-                       Lock::release('item_insert_content');
+                       DI::lock()->release('item_insert_content');
                }
        }