Merge remote-tracking branch 'upstream/develop' into no-mod-item

This commit is contained in:
Michael 2022-11-23 06:29:49 +00:00
commit 008eeeea4e
49 changed files with 225 additions and 284 deletions

View file

@ -1,11 +1,13 @@
To let the connector work properly you should define an application name in `config/addon.config.php`:
To let the connector work properly you should define an application name in `config/pumpio.config.php`:
'pumpio' => [
'application_name' => '',
// Displays forwarded posts like "wall-to-wall" posts.
'wall-to-wall_share' => false,
// Given in minutes
'poll_interval' => 5,
],
return [
'pumpio' => [
'application_name' => '',
// Displays forwarded posts like "wall-to-wall" posts.
'wall-to-wall_share' => false,
// Given in minutes
'poll_interval' => 5,
],
];
This name appears at pump.io and is important for not mirroring back posts that came from Friendica.

View file

@ -1,7 +1,7 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
// Instead, copy this file to config/pumpio.config.php in your Friendica directory and set the correct values there
return [
'pumpio' => [

View file

@ -99,10 +99,10 @@ function pumpio_registerclient(App $a, $host)
$application_name = DI::baseUrl()->getHostname();
}
$adminlist = explode(',', str_replace(' ', '', DI::config()->get('config', 'admin_email')));
$firstAdmin = User::getFirstAdmin(['email']);
$params['type'] = 'client_associate';
$params['contacts'] = $adminlist[0];
$params['contacts'] = $firstAdmin['email'];
$params['application_type'] = 'native';
$params['application_name'] = $application_name;
$params['logo_url'] = DI::baseUrl()->get() . '/images/friendica-256.png';
@ -320,7 +320,7 @@ function pumpio_settings_post(App $a, array &$b)
function pumpio_load_config(App $a, ConfigFileLoader $loader)
{
$a->getConfigCache()->load($loader->loadAddonConfig('pumpio'));
$a->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
}
function pumpio_hook_fork(App $a, array &$b)