+function contact_conversations(App $a, $contact_id, $update)
+{
+ $o = '';
+
+ if (!$update) {
+ // We need the editor here to be able to reshare an item.
+ if (local_user()) {
+ $x = [
+ 'is_owner' => true,
+ 'allow_location' => $a->user['allow_location'],
+ 'default_location' => $a->user['default-location'],
+ 'nickname' => $a->user['nickname'],
+ 'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
+ 'acl' => ACL::getFullSelectorHTML($a->user, true),
+ 'bang' => '',
+ 'visitor' => 'block',
+ 'profile_uid' => local_user(),
+ ];
+ $o = status_editor($a, $x, 0, true);
+ }
+ }
+
+ $contact = DBA::selectFirst('contact', ['uid', 'url', 'id'], ['id' => $contact_id]);
+
+ if (!$update) {
+ $o .= contacts_tab($a, $contact, 1);
+ }
+
+ if (DBA::isResult($contact)) {
+ $a->page['aside'] = "";
+
+ $profiledata = Contact::getDetailsByURL($contact["url"]);
+
+ if (local_user()) {
+ if (in_array($profiledata["network"], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS])) {
+ $profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
+ }
+ }
+
+ Profile::load($a, "", 0, $profiledata, true);
+ $o .= Contact::getPostsFromUrl($contact["url"], true, $update);
+ }
+
+ return $o;
+}
+
+function contact_posts(App $a, $contact_id)