Skip to content

Commit da894c8

Browse files
hamza221backportbot[bot]
authored andcommitted
fix(cardDav): Only update user card on actual mapped propreties changes
fix(cardDav): Only update user card on actual mapped propreties changes Signed-off-by: Hamza <hamzamahjoubi221@gmail.com> [skip ci]
1 parent 705e647 commit da894c8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/dav/lib/CardDAV/SyncService.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ public function updateUser(IUser $user): void {
152152
if (is_null($vCard)) {
153153
$this->backend->deleteCard($addressBookId, $cardId);
154154
} else {
155-
$this->backend->updateCard($addressBookId, $cardId, $vCard->serialize());
155+
$cardData = $vCard->serialize();
156+
// Writing an identical card would still bump the address book
157+
// sync token and make every client re-download the card
158+
if ($card['carddata'] !== $cardData) {
159+
$this->backend->updateCard($addressBookId, $cardId, $cardData);
160+
}
156161
}
157162
}
158163
}, $this->dbConnection);

0 commit comments

Comments
 (0)