1
1
Fork 0

don't send attendance activities to diaspora (unsupported)

This commit is contained in:
rabuzarus 2015-10-11 13:07:19 +02:00
parent 0eae67ea48
commit 0b36b09823
2 changed files with 18 additions and 8 deletions

View file

@ -520,11 +520,16 @@ function delivery_run(&$argv, &$argc){
if((! $contact['pubkey']) && (! $public_message))
break;
if($target_item['verb'] === ACTIVITY_DISLIKE) {
// unsupported
break;
$unsupported_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
//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
logger('delivery: diaspora retract: ' . $loc);

View file

@ -908,11 +908,16 @@ function notifier_run(&$argv, &$argc){
if(! $contact['pubkey'])
break;
if($target_item['verb'] === ACTIVITY_DISLIKE) {
// unsupported
break;
$unsupported_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
//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
diaspora_send_retraction($target_item,$owner,$contact);
break;