Deleting Contact - DeleteAsMoves value not passed to backend
-
@manfred
I finally got a few hours to debug through this. Bottom line isContentParameters class has a deletesasmoves property with a default “unset” value of true. This is never used anywhere in the z-push-develop source tree as far as I can see. So passing that property in the ContentParameters object to the backend functions is of zero value.
SyncParameters class has a deletesasmoves property with a default “unset” value of false. This is updated based on the presence of the DeletesAsMoves flag in the incoming sync collection. It is subsequently used to decide between calling ImportMessageMove or ImportMessageDeletion - so if backend->DeleteMessage gets called it is because the SyncCollection dictated that. So, the basic code logic is correct - and the ticket ZP-1604 should be closed on that basis.
However, there is one remaining issue - the default “unset” value of deletesasmoves in SyncParameters is set to false. This is incorrect according to the specification which states
“If the client wants to permanently delete items, the request MUST include the DeletesAsMoves element with a value of 0 (FALSE). A value of 1 (TRUE), which is the default, indicates that any deleted items are moved to the Deleted Items folder. The default is assumed when the DeletesAsMoves element is either empty or not present.”
I will open a separate ticket for that.