friendika-z initial implementation
This commit is contained in:
parent
aa4636d03a
commit
96857389ac
6 changed files with 25 additions and 6 deletions
|
@ -431,6 +431,10 @@ function facebook_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
if((local_user()) && (local_user() == $b['uid'])) {
|
if((local_user()) && (local_user() == $b['uid'])) {
|
||||||
|
|
||||||
|
// Facebook is not considered a private network
|
||||||
|
if($b['prvnets'])
|
||||||
|
return;
|
||||||
|
|
||||||
if($b['parent']) {
|
if($b['parent']) {
|
||||||
$r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
intval($b['parent']),
|
intval($b['parent']),
|
||||||
|
|
|
@ -303,10 +303,14 @@ function statusnet_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
|
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
|
||||||
|
|
||||||
load_pconfig(local_user(), 'statusnet');
|
// Status.Net is not considered a private network
|
||||||
|
if($b['prvnets'])
|
||||||
|
return;
|
||||||
|
|
||||||
|
load_pconfig(local_user(), 'statusnet');
|
||||||
|
|
||||||
$api = get_pconfig(local_user(), 'statusnet', 'baseapi');
|
$api = get_pconfig(local_user(), 'statusnet', 'baseapi');
|
||||||
$ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
|
$ckey = get_pconfig(local_user(), 'statusnet', 'consumerkey' );
|
||||||
$csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
|
$csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
|
||||||
$otoken = get_pconfig(local_user(), 'statusnet', 'oauthtoken' );
|
$otoken = get_pconfig(local_user(), 'statusnet', 'oauthtoken' );
|
||||||
$osecret = get_pconfig(local_user(), 'statusnet', 'oauthsecret' );
|
$osecret = get_pconfig(local_user(), 'statusnet', 'oauthsecret' );
|
||||||
|
|
|
@ -195,6 +195,11 @@ function twitter_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (! $b['parent']) ) {
|
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (! $b['parent']) ) {
|
||||||
|
|
||||||
|
// Twitter is not considered a private network
|
||||||
|
if($b['prvnets'])
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
load_pconfig(local_user(), 'twitter');
|
load_pconfig(local_user(), 'twitter');
|
||||||
|
|
||||||
$ckey = get_config('twitter', 'consumerkey' );
|
$ckey = get_config('twitter', 'consumerkey' );
|
||||||
|
|
|
@ -64,6 +64,8 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
$sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face' ) ";
|
$sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face' ) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($privmail)
|
if($privmail)
|
||||||
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
|
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
|
||||||
else
|
else
|
||||||
|
|
|
@ -106,7 +106,8 @@ function notifier_run($argv, $argc){
|
||||||
$top_level = true;
|
$top_level = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("SELECT `contact`.*, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`
|
$r = q("SELECT `contact`.*, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
|
||||||
|
`user`.`page-flags`, `user`.`prvnets`
|
||||||
FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||||
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
|
@ -329,7 +330,8 @@ function notifier_run($argv, $argc){
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'stat':
|
case 'stat':
|
||||||
|
if($owner['prvnets'])
|
||||||
|
break;
|
||||||
if($followup && $contact['notify']) {
|
if($followup && $contact['notify']) {
|
||||||
logger('notifier: slapdelivery: ' . $contact['name']);
|
logger('notifier: slapdelivery: ' . $contact['name']);
|
||||||
$deliver_status = slapper($owner,$contact['notify'],$slap);
|
$deliver_status = slapper($owner,$contact['notify'],$slap);
|
||||||
|
@ -373,6 +375,7 @@ function notifier_run($argv, $argc){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'mail':
|
case 'mail':
|
||||||
|
|
||||||
// WARNING: does not currently convert to RFC2047 header encodings, etc.
|
// WARNING: does not currently convert to RFC2047 header encodings, etc.
|
||||||
|
@ -447,9 +450,9 @@ function notifier_run($argv, $argc){
|
||||||
mail($addr, $subject, $message, $headers);
|
mail($addr, $subject, $message, $headers);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'dspr':
|
|
||||||
case 'feed':
|
case 'feed':
|
||||||
case 'face':
|
case 'face':
|
||||||
|
case 'dspr':
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,6 +445,7 @@ function item_post(&$a) {
|
||||||
|
|
||||||
$datarray['parent'] = $parent;
|
$datarray['parent'] = $parent;
|
||||||
$datarray['self'] = $self;
|
$datarray['self'] = $self;
|
||||||
|
$datarray['prvnets'] = $user['prvnets'];
|
||||||
|
|
||||||
if($orig_post)
|
if($orig_post)
|
||||||
$datarray['edit'] = true;
|
$datarray['edit'] = true;
|
||||||
|
|
Loading…
Reference in a new issue