diff options
Diffstat (limited to 'include/Import')
-rw-r--r-- | include/Import/Importer.php | 4 | ||||
-rw-r--r-- | include/Import/import_diaspora.php | 5 | ||||
-rw-r--r-- | include/Import/refimport.php | 11 |
3 files changed, 14 insertions, 6 deletions
diff --git a/include/Import/Importer.php b/include/Import/Importer.php index 5e684cd8e..cddfac7b5 100644 --- a/include/Import/Importer.php +++ b/include/Import/Importer.php @@ -1,11 +1,11 @@ <?php /** @file */ -namespace RedMatrix\Import; +namespace Hubzilla\Import; /** * @brief Class Import * - * @package RedMatrix\Import + * @package Hubzilla\Import */ class Import { diff --git a/include/Import/import_diaspora.php b/include/Import/import_diaspora.php index fca9fa4f2..a0f473b50 100644 --- a/include/Import/import_diaspora.php +++ b/include/Import/import_diaspora.php @@ -57,6 +57,10 @@ function import_diaspora($data) { $channel_id = $c['channel']['channel_id']; + // Hubzilla only: Turn on the Diaspora protocol so that follow requests will be sent. + + set_pconfig($channel_id,'system','diaspora_allowed','1'); + // todo - add auto follow settings, (and strip exif in hubzilla) $location = escape_tags($data['user']['profile']['location']); @@ -70,7 +74,6 @@ function import_diaspora($data) { ); if($data['user']['profile']['nsfw']) { - // fixme for hubzilla which doesn't use pageflags any more q("update channel set channel_pageflags = (channel_pageflags | %d) where channel_id = %d", intval(PAGE_ADULT), intval($channel_id) diff --git a/include/Import/refimport.php b/include/Import/refimport.php index b9b6bf639..3ef8870ac 100644 --- a/include/Import/refimport.php +++ b/include/Import/refimport.php @@ -88,7 +88,11 @@ function refimport_content(&$a) { $arr['author_xchan'] = $channel['channel_hash']; $arr['owner_xchan'] = $channel['channel_hash']; $arr['app'] = REFLECT_BLOGNAME; - $arr['item_flags'] = ITEM_ORIGIN|ITEM_WALL|ITEM_THREAD_TOP; + + $arr['item_origin'] = 1; + $arr['item_wall'] = 1; + $arr['item_thread_top'] = 1; + $arr['verb'] = ACTIVITY_POST; // this is an assumption @@ -205,7 +209,7 @@ function reflect_find_user($users,$name) { function reflect_comment_store($channel,$post,$comment,$user) { - // if the commenter was the channel owner, use their redmatrix xchan + // if the commenter was the channel owner, use their hubzilla xchan if($comment['author'] === REFLECT_EXPORTUSERNAME && $comment['registered']) $hash = $channel['xchan_hash']; @@ -256,7 +260,8 @@ function reflect_comment_store($channel,$post,$comment,$user) { $arr['edited'] = $comment['created']; $arr['author_xchan'] = $hash; $arr['owner_xchan'] = $channel['channel_hash']; - $arr['item_flags'] = ITEM_ORIGIN|ITEM_WALL; + $arr['item_origin'] = 1; + $arr['item_wall'] = 1; $arr['verb'] = ACTIVITY_POST; $arr['comment_policy'] = 'contacts'; |