]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Delivery.php
OnePoll: We now force an update check all the time
[friendica.git] / src / Worker / Delivery.php
index bb30fc3bf4bef41f477563ea661eeaef735fd48c..b3d3ecc1409e8c46439708ed40d81ae80170db4d 100644 (file)
@@ -9,7 +9,8 @@ use Friendica\App;
 use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
-use Friendica\Object\Contact;
+use Friendica\Model\Contact;
+use Friendica\Model\User;
 use Friendica\Protocol\Diaspora;
 use Friendica\Protocol\DFRN;
 use Friendica\Protocol\Email;
@@ -140,27 +141,16 @@ class Delivery {
                        }
                }
 
-               $r = q("SELECT `contact`.*, `user`.`prvkey` AS `uprvkey`,
-                       `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
-                       `user`.`page-flags`, `user`.`account-type`, `user`.`prvnets`
-                       FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
-                       WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
-                       intval($uid)
-               );
-
-               if (!DBM::is_result($r)) {
+               $owner = User::getOwnerDataById($uid);
+               if (!$owner) {
                        return;
                }
 
-               $owner = $r[0];
-
                $walltowall = (($top_level && ($owner['id'] != $items[0]['contact-id'])) ? true : false);
 
                $public_message = true;
 
                if (!($mail || $fsuggest || $relocate)) {
-                       require_once 'include/group.php';
-
                        $parent = $items[0];
 
                        // This is IMPORTANT!!!!