diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Profiles.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Profiles.java index 025f4519e..3551efcd9 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Profiles.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Profiles.java @@ -64,7 +64,9 @@ public class Profiles implements ProfilesStore { + AVATAR + " = EXCLUDED." + AVATAR + ", " + ABOUT + " = EXCLUDED." + ABOUT + ", " + ABOUT_EMOJI + " = EXCLUDED." + ABOUT_EMOJI + ", " - + PAYMENT_ADDRESS + " = EXCLUDED." + PAYMENT_ADDRESS) + + PAYMENT_ADDRESS + " = EXCLUDED." + PAYMENT_ADDRESS + ", " + + DELETED + " = FALSE, " + + COMMITMENT + " = CASE WHEN profiles." + DELETED + " = TRUE THEN EXCLUDED." + COMMITMENT + " ELSE profiles." + COMMITMENT + " END") .bind("uuid", uuid) .bind("version", profile.getVersion()) .bind("name", profile.getName())