Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15465788
D17809.id42824.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17809.id42824.diff
View Options
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
@@ -127,6 +127,9 @@
// Clear the availability caches for users whose availability is affected
// by this edit.
+ $phids = mpull($object->getInvitees(), 'getInviteePHID');
+ $phids = array_fuse($phids);
+
$invalidate_all = false;
$invalidate_phids = array();
foreach ($xactions as $xaction) {
@@ -146,16 +149,21 @@
$invalidate_phids[$acting_phid] = $acting_phid;
break;
case PhabricatorCalendarEventInviteTransaction::TRANSACTIONTYPE:
- foreach ($xaction->getNewValue() as $phid => $ignored) {
+ foreach ($xaction->getOldValue() as $phid) {
+ // Add the possibly un-invited user to the list of potentially
+ // affected users if they are't already present.
+ $phids[$phid] = $phid;
+
+ $invalidate_phids[$phid] = $phid;
+ }
+
+ foreach ($xaction->getNewValue() as $phid) {
$invalidate_phids[$phid] = $phid;
}
break;
}
}
- $phids = mpull($object->getInvitees(), 'getInviteePHID');
- $phids = array_fuse($phids);
-
if (!$invalidate_all) {
$phids = array_select_keys($phids, $invalidate_phids);
}
@@ -168,10 +176,9 @@
queryfx(
$conn_w,
'UPDATE %T SET availabilityCacheTTL = NULL
- WHERE phid IN (%Ls) AND availabilityCacheTTL >= %d',
+ WHERE phid IN (%Ls)',
$user->getTableName(),
- $phids,
- $object->getStartDateTimeEpochForCache());
+ $phids);
}
return $xactions;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Apr 3 2025, 11:09 PM (5 w, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713465
Default Alt Text
D17809.id42824.diff (1 KB)
Attached To
Mode
D17809: Fix two Calendar availability cache issues
Attached
Detach File
Event Timeline
Log In to Comment