if($contact['remote_self']) {
$datarray['wall'] = 1;
- // Test
- $datarray['author-name'] = $datarray['owner-name'];
- $datarray['author-link'] = $datarray['owner-link'];
- $datarray['author-avatar'] = $datarray['owner-avatar'];
+ if ($contact['remote_self'] == 2) {
+ $r = q("SELECT `id`,`url`,`name`,`photo`,`network` FROM `contact` WHERE `uid` = %d AND `self`", intval($importer['uid']));
+ if (count($r)) {
+ $datarray['contact-id'] = $r[0]["id"];
+ $datarray['network'] = $r[0]["network"];
+
+ $datarray['owner-name'] = $r[0]["name"];
+ $datarray['owner-link'] = $r[0]["url"];
+ $datarray['owner-avatar'] = $r[0]["photo"];
+
+ $datarray['author-name'] = $datarray['owner-name'];
+ $datarray['author-link'] = $datarray['owner-link'];
+ $datarray['author-avatar'] = $datarray['owner-avatar'];
+ }
+ }
$notify = true;
if($contact['network'] === NETWORK_FEED) {
if($importer['remote_self']) {
$datarray['wall'] = 1;
- // Test
- $datarray['author-name'] = $datarray['owner-name'];
- $datarray['author-link'] = $datarray['owner-link'];
- $datarray['author-avatar'] = $datarray['owner-avatar'];
+ if ($importer['remote_self'] == 2) {
+ $r = q("SELECT `id`,`url`,`name`,`photo`,`network` FROM `contact` WHERE `uid` = %d AND `self`",
+ intval($importer['importer_uid']));
+ if (count($r)) {
+ $datarray['contact-id'] = $r[0]["id"];
+ $datarray['network'] = $r[0]["network"];
+
+ $datarray['owner-name'] = $r[0]["name"];
+ $datarray['owner-link'] = $r[0]["url"];
+ $datarray['owner-avatar'] = $r[0]["photo"];
+
+ $datarray['author-name'] = $datarray['owner-name'];
+ $datarray['author-link'] = $datarray['owner-link'];
+ $datarray['author-avatar'] = $datarray['owner-avatar'];
+ }
+ }
$notify = true;
} else
'$label_photo' => t('New photo from this URL'),
'$label_remote_self' => t('Remote Self'),
'$allow_remote_self' => get_config('system','allow_users_remote_self'),
- '$remote_self' => array('remote_self', t('Mirror postings from this contact'), $contact['remote_self'], t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.')),
+ '$remote_self' => array('remote_self', t('Mirror postings from this contact'), $contact['remote_self'], t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.'), array('0'=>t('No mirroring'), '1'=>t('Mirror as forwarded posting'), '2'=>t('Mirror as my own posting'))),
'$contact_name' => $contact['name'],
'$contact_nick' => $contact['nick'],
'$contact_id' => $contact['id'],