Logger::notice('installed GNU Social');
}
-function statusnet_jot_nets(App $a, array &$jotnets_fields)
+function statusnet_jot_nets(array &$jotnets_fields)
{
if (!DI::userSession()->getLocalUserId()) {
return;
}
}
-function statusnet_settings_post(App $a, $post)
+function statusnet_settings_post($post)
{
if (!DI::userSession()->getLocalUserId()) {
return;
}
}
-function statusnet_settings(App $a, array &$data)
+function statusnet_settings(array &$data)
{
if (!DI::userSession()->getLocalUserId()) {
return;
'$request_token' => $request_token ?? null,
'$account' => $account ?? null,
- '$authenticate_url' => DI::baseUrl()->get() . '/statusnet/connect',
+ '$authenticate_url' => DI::baseUrl() . '/statusnet/connect',
'$consumerkey' => ['statusnet-consumerkey', DI::l10n()->t('OAuth Consumer Key'), '', '', false, ' size="35'],
'$consumersecret' => ['statusnet-consumersecret', DI::l10n()->t('OAuth Consumer Secret'), '', '', false, ' size="35'],
];
}
-function statusnet_hook_fork(App $a, array &$b)
+function statusnet_hook_fork(array &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
$post = $b['data'];
- // Deleting and editing is not supported by the addon
- if ($post['deleted'] || ($post['created'] !== $post['edited'])) {
- $b['execute'] = false;
- return;
- }
-
- if ($post['app'] == 'StatusNet') {
- $b['execute'] = false;
- return;
- }
-
- // Comments are never exported when we don't import the GNU Social timeline
- if (strpos($post['postopts'] ?? '', 'statusnet') === false || ($post['parent'] != $post['id']) || $post['private']) {
+ if ($post['deleted'] || ($post['created'] !== $post['edited']) || strpos($post['postopts'] ?? '', 'statusnet') === false || ($post['parent'] != $post['id']) || $post['private']) {
$b['execute'] = false;
return;
}
}
-function statusnet_post_local(App $a, array &$b)
+function statusnet_post_local(array &$b)
{
if ($b['edit']) {
return;
$b['postopts'] .= 'statusnet';
}
-function statusnet_post_hook(App $a, array &$b)
+function statusnet_post_hook(array &$b)
{
/**
* Post to GNU Social
}
}
-function statusnet_addon_admin_post(App $a)
+function statusnet_addon_admin_post()
{
$sites = [];
$sites = DI::config()->set('statusnet', 'sites', $sites);
}
-function statusnet_addon_admin(App $a, string &$o)
+function statusnet_addon_admin(string &$o)
{
$sites = DI::config()->get('statusnet', 'sites');
$sitesform = [];