don't send attendance activities to diaspora (unsupported)
This commit is contained in:
parent
0eae67ea48
commit
0b36b09823
2 changed files with 18 additions and 8 deletions
|
@ -520,11 +520,16 @@ function delivery_run(&$argv, &$argc){
|
||||||
if((! $contact['pubkey']) && (! $public_message))
|
if((! $contact['pubkey']) && (! $public_message))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if($target_item['verb'] === ACTIVITY_DISLIKE) {
|
$unsupported_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
|
||||||
// unsupported
|
|
||||||
break;
|
//don't transmit activities which are not supported by diaspora
|
||||||
|
foreach($unsupported_activities as $act) {
|
||||||
|
if(activity_match($target_item['verb'],$act)) {
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif(($target_item['deleted']) && ($target_item['uri'] === $target_item['parent-uri'])) {
|
|
||||||
|
if(($target_item['deleted']) && ($target_item['uri'] === $target_item['parent-uri'])) {
|
||||||
// top-level retraction
|
// top-level retraction
|
||||||
logger('delivery: diaspora retract: ' . $loc);
|
logger('delivery: diaspora retract: ' . $loc);
|
||||||
|
|
||||||
|
|
|
@ -908,11 +908,16 @@ function notifier_run(&$argv, &$argc){
|
||||||
if(! $contact['pubkey'])
|
if(! $contact['pubkey'])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if($target_item['verb'] === ACTIVITY_DISLIKE) {
|
$unsupported_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
|
||||||
// unsupported
|
|
||||||
break;
|
//don't transmit activities which are not supported by diaspora
|
||||||
|
foreach($unsupported_activities as $act) {
|
||||||
|
if(activity_match($target_item['verb'],$act)) {
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif(($target_item['deleted']) && (($target_item['uri'] === $target_item['parent-uri']) || $followup)) {
|
|
||||||
|
if(($target_item['deleted']) && (($target_item['uri'] === $target_item['parent-uri']) || $followup)) {
|
||||||
// send both top-level retractions and relayable retractions for owner to relay
|
// send both top-level retractions and relayable retractions for owner to relay
|
||||||
diaspora_send_retraction($target_item,$owner,$contact);
|
diaspora_send_retraction($target_item,$owner,$contact);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue