2020-07-06 08:54:22 +00:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"crypto/ecdsa"
|
|
|
|
|
|
|
|
"github.com/status-im/status-go/protocol/protobuf"
|
|
|
|
)
|
|
|
|
|
2022-05-27 09:14:40 +00:00
|
|
|
type CommKeyExMsgType uint8
|
|
|
|
|
|
|
|
const (
|
|
|
|
KeyExMsgNone CommKeyExMsgType = 0
|
|
|
|
KeyExMsgReuse CommKeyExMsgType = 1
|
|
|
|
KeyExMsgRekey CommKeyExMsgType = 2
|
|
|
|
)
|
|
|
|
|
2020-07-06 08:54:22 +00:00
|
|
|
// RawMessage represent a sent or received message, kept for being able
|
|
|
|
// to re-send/propagate
|
|
|
|
type RawMessage struct {
|
2022-05-27 09:14:40 +00:00
|
|
|
ID string
|
|
|
|
LocalChatID string
|
|
|
|
LastSent uint64
|
|
|
|
SendCount int
|
|
|
|
Sent bool
|
|
|
|
ResendAutomatically bool
|
|
|
|
SkipEncryption bool
|
|
|
|
SendPushNotification bool
|
|
|
|
MessageType protobuf.ApplicationMetadataMessage_Type
|
|
|
|
Payload []byte
|
|
|
|
Sender *ecdsa.PrivateKey
|
|
|
|
Recipients []*ecdsa.PublicKey
|
|
|
|
SkipGroupMessageWrap bool
|
|
|
|
SendOnPersonalTopic bool
|
|
|
|
CommunityID []byte
|
|
|
|
CommunityKeyExMsgType CommKeyExMsgType
|
2022-11-07 20:01:06 +00:00
|
|
|
Ephemeral bool
|
2020-07-06 08:54:22 +00:00
|
|
|
}
|