mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:50:10 +00:00
Clean up the Diaspora connectivity:
- Move Diaspora code into separate functions to make it more modular - Create more checks for whether Diaspora connectivity has been enabled
This commit is contained in:
parent
fad2679c7e
commit
8bb7ab88fb
5 changed files with 216 additions and 129 deletions
|
@ -709,11 +709,11 @@ function notifier_run($argv, $argc){
|
|||
}
|
||||
break;
|
||||
case NETWORK_DIASPORA:
|
||||
require_once('include/diaspora.php');
|
||||
|
||||
if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')))
|
||||
break;
|
||||
|
||||
require_once('include/diaspora.php');
|
||||
|
||||
if($mail) {
|
||||
diaspora_send_mail($item,$owner,$contact);
|
||||
break;
|
||||
|
@ -860,13 +860,17 @@ function notifier_run($argv, $argc){
|
|||
|
||||
}
|
||||
|
||||
// If the item was deleted, clean up the `sign` table
|
||||
|
||||
// If the item was deleted, clean up the `sign` table (for Diaspora signatures)
|
||||
// Do this even if Diaspora support is disabled, as it may have been enabled in
|
||||
// the past
|
||||
if($target_item['deleted']) {
|
||||
$r = q("DELETE FROM sign where `retract_iid` = %d",
|
||||
intval($target_item['id'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
logger('notifier: calling hooks', LOGGER_DEBUG);
|
||||
|
||||
if($normal_mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue