mirror of
https://github.com/ellite/Wallos.git
synced 2025-12-23 23:18:07 -05:00
use stable UID for iCal events to prevent duplicates (#966)
Changed UID generation from uniqid() to a stable format based on
subscription ID (wallos-subscription-{id}@wallos). This ensures that
calendar applications update existing events instead of creating
duplicates when the feed is refreshed.
According to RFC 5545 section 3.8.4.7, the UID property must be
globally unique and persistent for the lifetime of the event.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET
|
||||
$subscription['trigger'] = ($subscription['notify_days_before'] == -1) ? $globalNotificationDays : ($subscription['notify_days_before'] ?: 1);
|
||||
$subscription['price'] = number_format($subscription['price'], 2);
|
||||
|
||||
$uid = uniqid();
|
||||
$uid = 'wallos-subscription-' . $subscription['id'] . '@wallos';
|
||||
$summary = html_entity_decode($subscription['name'], ENT_QUOTES, 'UTF-8');
|
||||
$description = "Price: {$subscription['currency']}{$subscription['price']}\\nCategory: {$subscription['category']}\\nPayment Method: {$subscription['payment_method']}\\nPayer: {$subscription['payer_user']}\\nNotes: {$subscription['notes']}";
|
||||
$dtstamp = gmdate('Ymd\THis\Z');
|
||||
|
||||
@@ -31,7 +31,7 @@ if ($subscription) {
|
||||
$subscription['price'] = number_format($subscription['price'], 2);
|
||||
|
||||
// Create ICS from subscription information
|
||||
$uid = uniqid();
|
||||
$uid = 'wallos-subscription-' . $subscription['id'] . '@wallos';
|
||||
$summary = html_entity_decode($subscription['name'], ENT_QUOTES, 'UTF-8');
|
||||
$description = "Price: {$subscription['currency']}{$subscription['price']}\nCategory: {$subscription['category']}\nPayment Method: {$subscription['payment_method']}\nPayer: {$subscription['payer_user']}\n\nNotes: {$subscription['notes']}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user