- $r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' LIMIT 1",
- dbesc(normalise_link($profile_url))
+ // Don't store the statusnet connector as network
+ // We can't simply set this to NETWORK_OSTATUS since the connector could have fetched posts from friendica as well
+ if ($network == NETWORK_STATUSNET)
+ $network = "";
+
+ // The global contacts should contain the original picture, not the cached one
+ if (($generation != 1) AND stristr(normalise_link($profile_photo), normalise_link($a->get_baseurl()."/photo/")))
+ $profile_photo = "";
+
+ $r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1",
+ dbesc(normalise_link($profile_url)), dbesc(NETWORK_STATUSNET)