Browse Source

don't send attendance activities to diaspora (unsupported)

pull/1929/head
rabuzarus 5 years ago
parent
commit
0b36b09823
2 changed files with 18 additions and 8 deletions
  1. +9
    -4
      include/delivery.php
  2. +9
    -4
      include/notifier.php

+ 9
- 4
include/delivery.php 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);


+ 9
- 4
include/notifier.php 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;


Loading…
Cancel
Save