Support Save History Default + Delete Server #529

Merged
sarah merged 8 commits from stable-blockers into master 2023-08-22 20:22:23 +00:00
1 changed files with 7 additions and 5 deletions
Showing only changes of commit e1877d69b7 - Show all commits

View File

@ -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"
Outdated
Review

so we have a profile level default, and then conversation level override?

do we want to rename from xDefault to xProfile? and xConversation or something as it's now a two level thing? also the comment is wrong, we did have 3 states, now we have... well we might want 3, but different, like notifications: "default" (do profile setting), "save", "delete"

so we have a profile level default, and then conversation level override? do we want to rename from xDefault to xProfile? and xConversation or something as it's now a two level thing? also the comment is wrong, we did have 3 states, now we have... well we might want 3, but different, like notifications: "default" (do profile setting), "save", "delete"
Outdated
Review

tho i guess we need to keep "DeleteHistoryDefault" for backwards compat too, but this should be split into two consts, and "DeleteHistoryDefault" now means just do the default, remeaning the name for compat

tho i guess we need to keep "DeleteHistoryDefault" for backwards compat too, but this should be split into two consts, and "DeleteHistoryDefault" now means just do the default, remeaning the name for compat
Outdated
Review

Yeah, these need to stay the same for profile attribute/values compat. But their meanings are consistent.

Yeah, these need to stay the same for profile attribute/values compat. But their meanings are consistent.
DeleteHistoryConfirmed = "DeleteHistoryConfirmed"
SaveHistoryDefault = "DefaultSaveHistory"