]> git.mxchange.org Git - friendica-addons.git/commitdiff
Don't store non federated contacts in gcontact
authorMichael <heluecht@pirati.ca>
Tue, 2 Jul 2019 17:55:03 +0000 (17:55 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 Jul 2019 17:55:03 +0000 (17:55 +0000)
pumpio/pumpio.php
statusnet/statusnet.php
twitter/twitter.php

index c4093f2b8ff89fd1b04a55612cc07c1125ed0879..cb295b893d4b85186191d6e874a66a9f42d95622 100644 (file)
@@ -18,7 +18,6 @@ use Friendica\Core\Protocol;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
-use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\Item;
 use Friendica\Model\User;
@@ -1011,24 +1010,6 @@ function pumpio_dolike(App $a, $uid, $self, $post, $own_id, $threadcompletion =
 
 function pumpio_get_contact($uid, $contact, $no_insert = false)
 {
-       $gcontact = ["url" => $contact->url, "network" => Protocol::PUMPIO, "generation" => 2,
-               "name" => $contact->displayName,  "hide" => true,
-               "nick" => $contact->preferredUsername,
-               "addr" => str_replace("acct:", "", $contact->id)];
-
-       if (!empty($contact->location->displayName)) {
-               $gcontact["location"] = $contact->location->displayName;
-       }
-
-       if (!empty($contact->summary)) {
-               $gcontact["about"] = $contact->summary;
-       }
-
-       if (!empty($contact->image->url)) {
-               $gcontact["photo"] = $contact->image->url;
-       }
-
-       GContact::update($gcontact);
        $cid = Contact::getIdForURL($contact->url, $uid);
 
        if ($no_insert) {
index 583eff8809177d1d5f20019f5ba3c7f4a9075b82..ed7b87d83dd726ae3816e7191469996fd9cc649c 100644 (file)
@@ -51,7 +51,6 @@ use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
-use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\Item;
 use Friendica\Model\ItemContent;
@@ -945,12 +944,6 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
                return -1;
        }
 
-       GContact::update(["url" => $contact->statusnet_profile_url,
-               "network" => Protocol::STATUSNET, "photo" => $contact->profile_image_url,
-               "name" => $contact->name, "nick" => $contact->screen_name,
-               "location" => $contact->location, "about" => $contact->description,
-               "addr" => statusnet_address($contact), "generation" => 3]);
-
        $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' AND `network` = '%s'LIMIT 1", intval($uid), DBA::escape(Strings::normaliseLink($contact->statusnet_profile_url)), DBA::escape(Protocol::STATUSNET));
 
        if (!DBA::isResult($r) && !$create_user) {
index faf814da9863c0111b6d441c8ad554441560b0c1..dd2241abf855b9b536b067e616541866c4af5bd7 100644 (file)
@@ -79,7 +79,6 @@ use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Conversation;
-use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\Item;
 use Friendica\Model\ItemContent;
@@ -1005,12 +1004,6 @@ function twitter_fetch_contact($uid, $data, $create_user)
        $url = "https://twitter.com/" . $data->screen_name;
        $addr = $data->screen_name . "@twitter.com";
 
-       GContact::update(["url" => $url, "network" => Protocol::TWITTER,
-               "photo" => $avatar, "hide" => true,
-               "name" => $data->name, "nick" => $data->screen_name,
-               "location" => $data->location, "about" => $data->description,
-               "addr" => $addr, "generation" => 2]);
-
        $fields = ['url' => $url, 'network' => Protocol::TWITTER,
                'name' => $data->name, 'nick' => $data->screen_name, 'addr' => $addr,
                 'location' => $data->location, 'about' => $data->description];