From 69f20959ff330dd34ca2e01b3562b4f64c3d83dd Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Wed, 12 Jul 2017 06:07:22 +0000
Subject: [PATCH] Update existing contact records with data from probing

---
 include/Contact.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/Contact.php b/include/Contact.php
index 9307bfdded..feeb040acc 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -625,7 +625,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
 
 	update_contact_avatar($data["photo"], $uid, $contact_id);
 
-	$contact = dba::select('contact', array('addr', 'alias', 'name', 'nick', 'avatar-date'),
+	$contact = dba::select('contact', array('addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date'),
 				array('id' => $contact_id), array('limit' => 1));
 
 	// This condition should always be true
@@ -638,6 +638,16 @@ function get_contact($url, $uid = 0, $no_update = false) {
 			'name' => $data['name'],
 			'nick' => $data['nick']);
 
+	if ($data['keywords'] != '') {
+		$updated['keywords'] = $data['keywords'];
+	}
+	if ($data['location'] != '') {
+		$updated['location'] = $data['location'];
+	}
+	if ($data['about'] != '') {
+		$updated['about'] = $data['about'];
+	}
+
 	if (($data["addr"] != $contact["addr"]) || ($data["alias"] != $contact["alias"])) {
 		$updated['uri-date'] = datetime_convert();
 	}
-- 
2.39.5