+
+ /**
+ * Check for a quoted post of a post of the given user
+ *
+ * @param array $item
+ * @param array $contacts Array of contact IDs
+ * @return bool The item is a quoted post of a user's post or comment
+ * @throws Exception
+ */
+ private static function checkQuoted(array $item, array $contacts): bool
+ {
+ if (empty($item['quote-uri-id'])) {
+ return false;
+ }
+ $condition = ['uri-id' => $item['quote-uri-id'], 'uid' => $item['uid'], 'author-id' => $contacts, 'deleted' => false, 'gravity' => [item::GRAVITY_PARENT, Item::GRAVITY_COMMENT]];
+ return Post::exists($condition);
+ }
+
+