aboutsummaryrefslogtreecommitdiffstats
path: root/include/Import
diff options
context:
space:
mode:
Diffstat (limited to 'include/Import')
-rw-r--r--include/Import/import_diaspora.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/include/Import/import_diaspora.php b/include/Import/import_diaspora.php
index c9c785385..060a1b38d 100644
--- a/include/Import/import_diaspora.php
+++ b/include/Import/import_diaspora.php
@@ -2,6 +2,7 @@
require_once('include/bb2diaspora.php');
require_once('include/group.php');
+require_once('include/follow.php');
function import_diaspora($data) {
$a = get_app();
@@ -75,16 +76,24 @@ function import_diaspora($data) {
// now add connections and send friend requests
-
-
+ if($data['contacts']) {
+ foreach($data['contacts'] as $contact) {
+ $result = new_contact($channel_id, $contact['person_diaspora_handle'], $c['channel']);
+ if($result['success']) {
+ if($contact['aspects']) {
+ foreach($contact['aspects'] as $aspect) {
+ group_add_member($channel_id,$aspect['name'],$result['abook']['xchan_hash']);
+ }
+ }
+ }
+ }
+ }
// Then add items - note this can't be done until Diaspora adds guids to exported
// items and comments
-
-
proc_run('php','include/notifier.php','location',$channel_id);
// This will indirectly perform a refresh_all *and* update the directory