mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-14 09:08:44 +02:00
Roll-forward "Add preliminary support for persisting pre-saved history entries remotely"
This rolls-forward commit 66916c27cb
.
This commit is contained in:
@ -9,13 +9,14 @@ 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"`
|
||||
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"`
|
||||
// Note that EncHistoryEntry.Date == HistoryEntry.EndTime
|
||||
Date time.Time `json:"time"`
|
||||
EncryptedId string `json:"id"`
|
||||
ReadCount int `json:"read_count"`
|
||||
}
|
||||
|
||||
/*
|
||||
@ -87,8 +88,11 @@ 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 message finished running
|
||||
Date time.Time `json:"date"`
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (m *MessageIdentifiers) Scan(value interface{}) error {
|
||||
|
Reference in New Issue
Block a user