Update feed URL after permanent redirect

This commit is contained in:
Matthew Exon 2024-07-01 18:50:13 +02:00
parent 918317fa49
commit 31f103a1f0
5 changed files with 63 additions and 2 deletions

View file

@ -2445,6 +2445,19 @@ class Contact
}
}
/**
* Updates the poll URL of a contact. This is the right function to call if there is a redirect.
*
* @param integer $id contact id
* @param string $url The new URL to use for polling
*
* @throws \Exception
*/
public static function updatePollUrl(int $id, string $url)
{
self::update(['poll', $url], ['id' => $id]);
}
/**
* Helper function for "updateFromProbe". Updates personal and public contact
*