Versions in this module Expand all Collapse all v1 v1.0.0 Oct 1, 2024 Changes in this version + const IndexArchive + const IndexClearChat + const IndexContact + const IndexDeleteChat + const IndexDeleteMessageForMe + const IndexLabelAssociationChat + const IndexLabelAssociationMessage + const IndexLabelEdit + const IndexMarkChatAsRead + const IndexMute + const IndexPin + const IndexSettingPushName + const IndexSettingUnarchiveChats + const IndexStar + const IndexUserStatusMute + var AllPatchNames = [...]WAPatchName + var ErrKeyNotFound = errors.New("didn't find app state key") + var ErrMismatchingContentMAC = errors.New("mismatching content MAC") + var ErrMismatchingIndexMAC = errors.New("mismatching index MAC") + var ErrMismatchingLTHash = errors.New("mismatching LTHash") + var ErrMismatchingPatchMAC = errors.New("mismatching patch MAC") + var ErrMissingPreviousSetValueOperation = errors.New("missing value MAC of previous SET operation") + type DownloadExternalFunc func(*waProto.ExternalBlobReference) ([]byte, error) + type ExpandedAppStateKeys struct + Index []byte + PatchMAC []byte + SnapshotMAC []byte + ValueEncryption []byte + ValueMAC []byte + type HashState struct + Hash [128]byte + Version uint64 + type Mutation struct + Action *waProto.SyncActionValue + Index []string + IndexMAC []byte + Operation waProto.SyncdMutation_SyncdOperation + ValueMAC []byte + type MutationInfo struct + Index []string + Value *waProto.SyncActionValue + Version int32 + type PatchInfo struct + Mutations []MutationInfo + Timestamp time.Time + Type WAPatchName + func BuildArchive(target types.JID, archive bool, lastMessageTimestamp time.Time, ...) PatchInfo + func BuildLabelChat(target types.JID, labelID string, labeled bool) PatchInfo + func BuildLabelEdit(labelID string, labelName string, labelColor int32, deleted bool) PatchInfo + func BuildLabelMessage(target types.JID, labelID, messageID string, labeled bool) PatchInfo + func BuildMute(target types.JID, mute bool, muteDuration time.Duration) PatchInfo + func BuildPin(target types.JID, pin bool) PatchInfo + func BuildSettingPushName(pushName string) PatchInfo + func BuildStar(target, sender types.JID, messageID types.MessageID, fromMe, starred bool) PatchInfo + type PatchList struct + HasMorePatches bool + Name WAPatchName + Patches []*waProto.SyncdPatch + Snapshot *waProto.SyncdSnapshot + func ParsePatchList(node *waBinary.Node, downloadExternal DownloadExternalFunc) (*PatchList, error) + type Processor struct + Log waLog.Logger + Store *store.Device + func NewProcessor(store *store.Device, log waLog.Logger) *Processor + func (proc *Processor) DecodePatches(list *PatchList, initialState HashState, validateMACs bool) (newMutations []Mutation, currentState HashState, err error) + func (proc *Processor) EncodePatch(keyID []byte, state HashState, patchInfo PatchInfo) ([]byte, error) + func (proc *Processor) GetMissingKeyIDs(pl *PatchList) [][]byte + type WAPatchName string + const WAPatchCriticalBlock + const WAPatchCriticalUnblockLow + const WAPatchRegular + const WAPatchRegularHigh + const WAPatchRegularLow Other modules containing this package github.com/snaril/wsapp/v2