- if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS)) AND
- ($contact['rel'] == CONTACT_IS_FOLLOWER))
- $follow = App::get_baseurl(true)."/follow?url=".urlencode($contact["url"]);
+ if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+ if ($contact['rel'] == CONTACT_IS_FOLLOWER) {
+ $follow = System::baseUrl(true)."/follow?url=".urlencode($contact["url"]);
+ $follow_text = t("Connect/Follow");
+ } elseif ($contact['rel'] == CONTACT_IS_FRIEND) {
+ $follow = System::baseUrl(true)."/unfollow?url=".urlencode($contact["url"]);
+ $follow_text = t("Disconnect/Unfollow");
+ }
+ }