summaryrefslogtreecommitdiffstats
path: root/apps/lookup_server_connector
diff options
context:
space:
mode:
Diffstat (limited to 'apps/lookup_server_connector')
-rw-r--r--apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
index c462eeedb43..da0721dc017 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -152,7 +152,14 @@ class RetryJob extends Job {
try {
if (count($data) === 1) {
- // No public data, just the federation Id
+ $dataOnLookupServer = $this->config->getUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '0') === '1';
+
+ if (!$dataOnLookupServer) {
+ // We never send data to the lookupserver so no need to delete it
+ return;
+ }
+
+ // There is data on the lookup server so we must delete it
$client->delete($this->lookupServer,
[
'body' => json_encode($signedData),
@@ -160,6 +167,8 @@ class RetryJob extends Job {
'connect_timeout' => 3,
]
);
+
+ $this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '0');
} else {
$client->post($this->lookupServer,
[
@@ -168,6 +177,7 @@ class RetryJob extends Job {
'connect_timeout' => 3,
]
);
+ $this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1');
}
// Reset retry counter