From e1877d69b7adfb93d78988dcdb3e188e15d2ebaa Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 14 Aug 2023 13:18:35 -0700 Subject: [PATCH] Better Comments on History Keys --- event/common.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/event/common.go b/event/common.go index 490f035..6fd6f09 100644 --- a/event/common.go +++ b/event/common.go @@ -327,18 +327,20 @@ const ( ContextSendFile = "im.cwtch.file.send.chunk" ) -// Define Default Attribute Keys +// Define Attribute Keys related to history preservation const ( SaveHistoryDefaultKey = "SaveHistoryDefault" // profile level default SaveHistoryKey = "SavePeerHistory" + DeleteHistoryDefault = "DefaultDeleteHistory" // used at both profile and contact level. ) // Define Default Attribute Values const ( - // Save History has 3 distinct states. By default we don't save history (DefaultDeleteHistory), if the peer confirms this - // we change to DeleteHistoryConfirmed, if they confirm they want to save then this becomes SaveHistoryConfirmed - // We use this distinction between default and confirmed to drive UI - DeleteHistoryDefault = "DefaultDeleteHistory" + // Save History has 3 distinct states. By default we refer to the profile level + // attribute SaveHistoryDefaultKey ( default: unset i.e. DefaultDeleteHistory), + // For each contact, if the profile owner confirms this we change to DeleteHistoryConfirmed, + // if the profile owner confirms they want to save history then this becomes SaveHistoryConfirmed + // These settings are set at the UI level usig SetScopeZoneAttribute local.profile.* SaveHistoryConfirmed = "SaveHistory" DeleteHistoryConfirmed = "DeleteHistoryConfirmed" SaveHistoryDefault = "DefaultSaveHistory"