Revert "Add preliminary support for persisting pre-saved history entries remotely"

This reverts commit ff98a7907c. That commit is incomplete since it doesn't include support for the continous deletion of pre-saved history entries as soon as they
finish running. Support for this will require a good bit more work/thought, so reverting for and keeping this code in the git history.
This commit is contained in:
David Dworken
2023-09-21 12:39:20 -07:00
parent ff98a7907c
commit 66916c27cb
8 changed files with 42 additions and 76 deletions

View File

@ -9,14 +9,13 @@ import (
// Represents an encrypted history entry
type EncHistoryEntry struct {
EncryptedData []byte `json:"enc_data"`
Nonce []byte `json:"nonce"`
DeviceId string `json:"device_id"`
UserId string `json:"user_id"`
// Note that EncHistoryEntry.Date == HistoryEntry.EndTime
Date time.Time `json:"time"`
EncryptedId string `json:"id"`
ReadCount int `json:"read_count"`
EncryptedData []byte `json:"enc_data"`
Nonce []byte `json:"nonce"`
DeviceId string `json:"device_id"`
UserId string `json:"user_id"`
Date time.Time `json:"time"`
EncryptedId string `json:"id"`
ReadCount int `json:"read_count"`
}
/*
@ -88,11 +87,8 @@ type MessageIdentifiers struct {
type MessageIdentifier struct {
// The device that the entry was recorded on (NOT the device where it is stored/requesting deletion)
DeviceId string `json:"device_id"`
// The timestamp when the command finished running. Serialized as "date" for legacy compatibility.
EndTime time.Time `json:"date"`
// The timestamp when the command started running.
// Note this field was added as part of supporting pre-saving commands, so older clients do not set this field
StartTime time.Time `json:"start_time"`
// The timestamp when the message finished running
Date time.Time `json:"date"`
}
func (m *MessageIdentifiers) Scan(value interface{}) error {