aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Contactedit.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-02-15 14:27:50 +0000
committerMario <mario@mariovavti.com>2024-02-15 14:27:50 +0000
commit6d125d02d8cc6b09843919eb9413abbb85582c1e (patch)
tree05d53765a6c4856dc9a989385678bedaceeb044c /Zotlabs/Module/Contactedit.php
parent0b18b35f5f28b0afc3104f10d33fac5b1675a76a (diff)
downloadvolse-hubzilla-6d125d02d8cc6b09843919eb9413abbb85582c1e.tar.gz
volse-hubzilla-6d125d02d8cc6b09843919eb9413abbb85582c1e.tar.bz2
volse-hubzilla-6d125d02d8cc6b09843919eb9413abbb85582c1e.zip
introduce get_actor() force flag to omit cache, rework contact refresh, special handling for announce by group, and revert change regarding friendica addressing anomality
Diffstat (limited to 'Zotlabs/Module/Contactedit.php')
-rw-r--r--Zotlabs/Module/Contactedit.php32
1 files changed, 15 insertions, 17 deletions
diff --git a/Zotlabs/Module/Contactedit.php b/Zotlabs/Module/Contactedit.php
index 58c3380a1..e20e90872 100644
--- a/Zotlabs/Module/Contactedit.php
+++ b/Zotlabs/Module/Contactedit.php
@@ -494,28 +494,32 @@ class Contactedit extends Controller {
'message' => ''
];
- if ($cmd === 'resetphoto') {
- q("update xchan set xchan_photo_date = '2001-01-01 00:00:00' where xchan_hash = '%s'",
+ if ($cmd === 'refresh') {
+ q("update xchan set xchan_photo_date = '0001-01-01 00:00:00', xchan_name_date = '0001-01-01 00:00:00' where xchan_hash = '%s'",
dbesc($contact['xchan_hash'])
);
- $cmd = 'refresh';
- }
- if ($cmd === 'refresh') {
if ($contact['xchan_network'] === 'zot6') {
if (Libzot::refresh($contact, App::get_channel())) {
$ret['success'] = true;
$ret['message'] = t('Refresh succeeded');
}
else {
- $ret['message'] = t('Refresh failed - channel is currently unavailable');
+ $ret['message'] = t('Refresh failed');
}
}
else {
// if you are on a different network we'll force a refresh of the connection basic info
- Master::Summon(['Notifier', 'permission_update', $contact['abook_id']]);
- $ret['success'] = true;
- $ret['message'] = t('Refresh succeeded');
+ $hookinfo = [
+ 'contact' => $contact,
+ 'success' => false,
+ 'message' => ''
+ ];
+
+ call_hooks('actor_refetch', $hookinfo);
+
+ $ret['success'] = $hookinfo['success'];
+ $ret['message'] = $hookinfo['message'];
}
return $ret;
@@ -625,16 +629,10 @@ class Contactedit extends Controller {
return [
'refresh' => [
- 'label' => t('Refresh Permissions'),
- 'title' => t('Fetch updated permissions'),
+ 'label' => t('Refresh'),
+ 'title' => t('Refetch contact info'),
],
- 'rephoto' => [
- 'label' => t('Refresh Photo'),
- 'title' => t('Fetch updated photo'),
- ],
-
-
'block' => [
'label' => (intval($contact['abook_blocked']) ? t('Unblock') : t('Block')),
'sel' => (intval($contact['abook_blocked']) ? 'active' : ''),