- if (DBM::is_result($like_item)) {
- // Already voted, undo it
- $fields = ['deleted' => true, 'unseen' => true, 'changed' => DateTimeFormat::utcNow()];
- /// @todo Consider using self::update - but before doing so, check the side effects
- dba::update('item', $fields, ['id' => $like_item['id']]);
-
- // Clean up the Diaspora signatures for this like
- // Go ahead and do it even if Diaspora support is disabled. We still want to clean up
- // if it had been enabled in the past
- dba::delete('sign', ['iid' => $like_item['id']]);
-
- $like_item_id = $like_item['id'];
- Worker::add(PRIORITY_HIGH, "Notifier", "like", $like_item_id);